File tree Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Expand file tree Collapse file tree 2 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ repositories {
58
58
dependencies {
59
59
implementation fileTree(dir : ' libs' , include : [' *.aar' , ' *.jar' ])
60
60
implementation project(' :capacitor-android' )
61
- implementation " io.ionic.libs:ionfiletransfer-android:1.0.0 "
61
+ implementation " io.ionic.libs:ionfiletransfer-android:1.0.1 "
62
62
implementation " androidx.appcompat:appcompat:$androidxAppCompatVersion "
63
63
64
64
testImplementation " junit:junit:$junitVersion "
Original file line number Diff line number Diff line change @@ -336,30 +336,7 @@ window.customElements.define(
336
336
const uploadProgressContainer = this . shadowRoot . querySelector ( '#uploadProgressContainer' ) ;
337
337
uploadProgressContainer . style . display = uploadProgress . checked ? 'block' : 'none' ;
338
338
339
- let filePath ;
340
-
341
- if ( Capacitor . getPlatform ( ) === 'web' ) {
342
- filePath = file . name ;
343
- } else {
344
- const base64 = await new Promise ( ( resolve , reject ) => {
345
- const reader = new FileReader ( ) ;
346
- reader . onload = ( ) => {
347
- const result = reader . result ;
348
- resolve ( result . split ( ',' ) [ 1 ] ) ;
349
- } ;
350
- reader . onerror = reject ;
351
- reader . readAsDataURL ( file ) ;
352
- } ) ;
353
-
354
- const savedFile = await Filesystem . writeFile ( {
355
- path : file . name ,
356
- data : base64 ,
357
- directory : Directory . Cache ,
358
- } ) ;
359
-
360
- filePath = await savedFile . uri ;
361
- }
362
-
339
+ let filePath = file . name ;
363
340
// Upload file
364
341
const result = await FileTransfer . uploadFile ( {
365
342
url,
You can’t perform that action at this time.
0 commit comments