[TIMOB-20426] Android: If use Titanium.Media.openPhotoGallery( options ) to pick an image with space in the filename, the blob cannot be retrieved with an exception fired
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | n/a |
Reporter | Kai Lu |
Assignee | Unknown |
Created | 2016-01-10T06:03:02.000+0000 |
Updated | 2018-02-28T19:55:47.000+0000 |
Description
as you can see from the error log the space has been replaced with %20, perhaps that's the reason it could not locate the file
error log:
ERROR] TiBlob: (main) [6558,65171] /storage/emulated/0/Download/2015-01-14%2013.46.39.jpg: open failed: ENOENT (No such file or dire
ctory)
[ERROR] TiBlob: java.io.FileNotFoundException: /storage/emulated/0/Download/2015-01-14%2013.46.39.jpg: open failed: ENOENT (No such f
ile or directory)
[ERROR] TiBlob: at libcore.io.IoBridge.open(IoBridge.java:456)
[ERROR] TiBlob: at java.io.FileInputStream.(FileInputStream.java:76)
[ERROR] TiBlob: at org.appcelerator.titanium.io.TiFile.getInputStream(TiFile.java:264)
[ERROR] TiBlob: at org.appcelerator.titanium.TiBlob.getInputStream(TiBlob.java:389)
[ERROR] TiBlob: at org.appcelerator.titanium.TiBlob.guessContentTypeFromStream(TiBlob.java:209)
[ERROR] TiBlob: at org.appcelerator.titanium.TiBlob.loadBitmapInfo(TiBlob.java:270)
[ERROR] TiBlob: at org.appcelerator.titanium.TiBlob.blobFromFile(TiBlob.java:140)
[ERROR] TiBlob: at ti.modules.titanium.media.MediaModule.createDictForImage(MediaModule.java:913)
[ERROR] TiBlob: at ti.modules.titanium.media.MediaModule$1.onResult(MediaModule.java:884)
[ERROR] TiBlob: at org.appcelerator.titanium.util.TiActivitySupportHelper$1.onResult(TiActivitySupportHelper.java:58)
[ERROR] TiBlob: at org.appcelerator.titanium.util.TiActivitySupportHelper.onActivityResult(TiActivitySupportHelper.java:107)
[ERROR] TiBlob: at org.appcelerator.titanium.TiBaseActivity.onActivityResult(TiBaseActivity.java:750)
[ERROR] TiBlob: at android.app.Activity.dispatchActivityResult(Activity.java:6192)
[ERROR] TiBlob: at android.app.ActivityThread.deliverResults(ActivityThread.java:3603)
[ERROR] TiBlob: at android.app.ActivityThread.handleSendResult(ActivityThread.java:3650)
[ERROR] TiBlob: at android.app.ActivityThread.access$1400(ActivityThread.java:154)
[ERROR] TiBlob: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1370)
[ERROR] TiBlob: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] TiBlob: at android.os.Looper.loop(Looper.java:135)
[ERROR] TiBlob: at android.app.ActivityThread.main(ActivityThread.java:5294)
[ERROR] TiBlob: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiBlob: at java.lang.reflect.Method.invoke(Method.java:372)
[ERROR] TiBlob: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
[ERROR] TiBlob: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
[ERROR] TiBlob: Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
[ERROR] TiBlob: at libcore.io.Posix.open(Native Method)
[ERROR] TiBlob: at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
[ERROR] TiBlob: at libcore.io.IoBridge.open(IoBridge.java:442)
No comments