@@ -18,7 +18,6 @@ import { FileEntry } from '@ionic-native/file/ngx';
1818import { MediaFile , CaptureError , CaptureAudioOptions , CaptureVideoOptions } from '@ionic-native/media-capture/ngx' ;
1919import { Subject } from 'rxjs' ;
2020
21- import { CoreApp } from '@services/app' ;
2221import { CoreFile , CoreFileProvider } from '@services/file' ;
2322import { CoreFilepool } from '@services/filepool' ;
2423import { CoreSites } from '@services/sites' ;
@@ -33,6 +32,7 @@ import { CoreError } from '@classes/errors/error';
3332import { CoreSite } from '@classes/site' ;
3433import { CoreFileEntry , CoreFileHelper } from '@services/file-helper' ;
3534import { CorePath } from '@singletons/path' ;
35+ import { CorePlatform } from '@services/platform' ;
3636
3737/**
3838 * File upload options.
@@ -236,7 +236,7 @@ export class CoreFileUploaderProvider {
236236 getCameraUploadOptions ( uri : string , isFromAlbum ?: boolean ) : CoreFileUploaderOptions {
237237 const extension = CoreMimetypeUtils . guessExtensionFromUrl ( uri ) ;
238238 const mimetype = CoreMimetypeUtils . getMimeType ( extension ) ;
239- const isIOS = CoreApp . isIOS ( ) ;
239+ const isIOS = CorePlatform . isIOS ( ) ;
240240 const options : CoreFileUploaderOptions = {
241241 deleteAfterUpload : ! isFromAlbum ,
242242 mimeType : mimetype ,
@@ -259,7 +259,7 @@ export class CoreFileUploaderProvider {
259259 // If the file was picked from the album, delete it only if it was copied to the app's folder.
260260 options . deleteAfterUpload = CoreFile . isFileInAppFolder ( uri ) ;
261261
262- if ( CoreApp . isAndroid ( ) ) {
262+ if ( CorePlatform . isAndroid ( ) ) {
263263 // Picking an image from album in Android adds a timestamp at the end of the file. Delete it.
264264 options . fileName = options . fileName . replace ( / ( \. [ ^ . ] * ) \? [ ^ . ] * $ / , '$1' ) ;
265265 }
0 commit comments