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 {
5858dependencies {
5959 implementation fileTree(dir : ' libs' , include : [' *.aar' , ' *.jar' ])
6060 implementation project(' :capacitor-android' )
61- implementation " io.ionic.libs:ionfiletransfer-android:1.0.0 "
61+ implementation " io.ionic.libs:ionfiletransfer-android:1.0.1 "
6262 implementation " androidx.appcompat:appcompat:$androidxAppCompatVersion "
6363
6464 testImplementation " junit:junit:$junitVersion "
Original file line number Diff line number Diff line change @@ -336,30 +336,7 @@ window.customElements.define(
336336 const uploadProgressContainer = this . shadowRoot . querySelector ( '#uploadProgressContainer' ) ;
337337 uploadProgressContainer . style . display = uploadProgress . checked ? 'block' : 'none' ;
338338
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 ;
363340 // Upload file
364341 const result = await FileTransfer . uploadFile ( {
365342 url,
You can’t perform that action at this time.
0 commit comments