Merge pull request #2879 from NoelDeMartin/MOBILE-3320
MOBILE-3320: Fix camera & large files upload
This commit is contained in:
		
						commit
						bf0857d0c0
					
				
							
								
								
									
										12
									
								
								config.xml
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								config.xml
									
									
									
									
									
								
							| @ -224,6 +224,16 @@ | ||||
|         <config-file parent="/*" target="AndroidManifest.xml"> | ||||
|             <uses-feature android:name="android.hardware.bluetooth" android:required="false" /> | ||||
|         </config-file> | ||||
|         <config-file parent="/*" target="AndroidManifest.xml"> | ||||
|             <queries> | ||||
|                 <intent> | ||||
|                     <action android:name="android.media.action.IMAGE_CAPTURE" /> | ||||
|                 </intent> | ||||
|                 <intent> | ||||
|                     <action android:name="android.intent.action.GET_CONTENT" /> | ||||
|                 </intent> | ||||
|             </queries> | ||||
|         </config-file> | ||||
|     </platform> | ||||
|     <platform name="ios"> | ||||
|         <resource-file src="GoogleService-Info.plist" /> | ||||
| @ -248,7 +258,7 @@ | ||||
|         <edit-config file="*-Info.plist" mode="merge" target="CFBundleShortVersionString"> | ||||
|             <string>3.9.5</string> | ||||
|         </edit-config> | ||||
|         <edit-config target="CFBundleLocalizations" file="*-Info.plist" mode="overwrite"> | ||||
|         <edit-config file="*-Info.plist" mode="overwrite" target="CFBundleLocalizations"> | ||||
|             <array> | ||||
|                 <string>en</string> | ||||
|             </array> | ||||
|  | ||||
| @ -1602,6 +1602,7 @@ | ||||
|   "core.errorinvalidresponse": "local_moodlemobileapp", | ||||
|   "core.errorloadingcontent": "local_moodlemobileapp", | ||||
|   "core.errorofflinedisabled": "local_moodlemobileapp", | ||||
|   "core.erroropenfiledownloading": "local_moodlemobileapp", | ||||
|   "core.erroropenfilenoapp": "local_moodlemobileapp", | ||||
|   "core.erroropenfilenoextension": "local_moodlemobileapp", | ||||
|   "core.erroropenpopup": "local_moodlemobileapp", | ||||
|  | ||||
| @ -50,7 +50,7 @@ | ||||
|                     </ion-label> | ||||
|                 </ion-item-divider> | ||||
|                 <ion-item class="ion-text-wrap" *ngFor="let contact of course.contacts" core-user-link [userId]="contact.id" | ||||
|                     [courseId]="isEnrolled ? course.id : null" [attr.aria-label]="'core.viewprofile' | translate"> | ||||
|                     [courseId]="isEnrolled ? course.id : null" [attr.aria-label]="'core.viewprofile' | translate" detail="true"> | ||||
|                     <core-user-avatar [user]="contact" slot="start" [userId]="contact.id" | ||||
|                         [courseId]="isEnrolled ? course.id : null"> | ||||
|                     </core-user-avatar> | ||||
|  | ||||
| @ -17,6 +17,10 @@ import { Camera, CameraOptions } from '@ionic-native/camera/ngx'; | ||||
| 
 | ||||
| import { CoreEmulatorCaptureHelper } from './capture-helper'; | ||||
| 
 | ||||
| // @todo remove android.media.action.IMAGE_CAPTURE and android.intent.action.GET_CONTENT entries
 | ||||
| // from config.xml once https://github.com/apache/cordova-plugin-camera/issues/673 is resolved.
 | ||||
| // (this is written here because comments get stripped out from config.xml)
 | ||||
| 
 | ||||
| /** | ||||
|  * Emulates the Cordova Camera plugin in browser. | ||||
|  */ | ||||
|  | ||||
| @ -68,7 +68,7 @@ export class CoreFileUploaderHelperProvider { | ||||
| 
 | ||||
|         const modal = await CoreDomUtils.showModalLoading(); | ||||
| 
 | ||||
|         const result = await Chooser.getFile(mimetypes ? mimetypes.join(',') : undefined); | ||||
|         const result = await Chooser.getFileMetadata(mimetypes ? mimetypes.join(',') : undefined); | ||||
| 
 | ||||
|         modal.dismiss(); | ||||
| 
 | ||||
|  | ||||
| @ -10,7 +10,7 @@ | ||||
| <ion-content> | ||||
|     <core-loading [hideUntil]="!loggedOut"> | ||||
|         <ion-list> | ||||
|             <ion-item button *ngIf="siteInfo" class="ion-text-wrap" core-user-link [userId]="siteInfo.userid"> | ||||
|             <ion-item button *ngIf="siteInfo" class="ion-text-wrap" core-user-link [userId]="siteInfo.userid" detail="true"> | ||||
|                 <core-user-avatar [user]="siteInfo" slot="start"></core-user-avatar> | ||||
|                 <ion-label> | ||||
|                     <p class="item-heading">{{siteInfo.fullname}}</p> | ||||
|  | ||||
| @ -100,6 +100,7 @@ | ||||
|     "errorinvalidresponse": "Invalid response received. Please contact your site administrator if the error persists.", | ||||
|     "errorloadingcontent": "Error loading content.", | ||||
|     "errorofflinedisabled": "Offline browsing is disabled on your site. You need to be connected to the internet to use the app.", | ||||
|     "erroropenfiledownloading": "Error opening file: you need to wait for the download to complete.", | ||||
|     "erroropenfilenoapp": "Error opening file: no app found to open this type of file.", | ||||
|     "erroropenfilenoextension": "Error opening file: the file doesn't have an extension.", | ||||
|     "erroropenpopup": "This activity is trying to open a popup. This is not supported in the app.", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user