[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301657#comment-15301657 ] Sergey Shakhnazarov edited comment on CB-11305 at 5/26/16 7:13 AM: --- Markdown analogue for ` is double curly braces {{}} was (Author: daserge): Markdown analogue for ` is double qurly braces {{ > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301269#comment-15301269 ] zhuisui edited comment on CB-11305 at 5/26/16 1:29 AM: --- [~daserge] Another question to ask you, why I cannot see this issue in *My Open Issues*? And, I think I mistook you yesterday. This code {code:javascript} window.resolveLocalFileSystemURL(cordova.file.applicationDirectory, function (assetsRoot) { assetsRoot.getFile('www/img/logo.png', null, function (image) { document.getElementById('imageFileCdv').src = image.toInternalURL(); {code} doesn't work on Android like "cdvfile://localhost/assets/path" do. was (Author: zyf0330): [~daserge] Another question to ask you, why I cannot see this issue in *My Open Issues*? > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301238#comment-15301238 ] zhuisui edited comment on CB-11305 at 5/26/16 1:06 AM: --- thanks for the text effects. About {code}toInternalURL{code}, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. Also, I use "code" in Text Formatting Notation, but it breaks line. What do you do? was (Author: zyf0330): thanks for the text effects. About {code}toInternalURL{code}, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301238#comment-15301238 ] zhuisui edited comment on CB-11305 at 5/26/16 1:05 AM: --- thanks for the text effects. About {code}toInternalURL{code}, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. was (Author: zyf0330): thanks for the text effects. About ^toInternalURL^, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301238#comment-15301238 ] zhuisui edited comment on CB-11305 at 5/26/16 1:04 AM: --- thanks for the text effects. About ^toInternalURL^, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. was (Author: zyf0330): thanks for the text effects. About {code:javascript}toInternalURL{code}, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301238#comment-15301238 ] zhuisui edited comment on CB-11305 at 5/26/16 1:02 AM: --- thanks for the text effects. About {code:javascript}toInternalURL{code}, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. was (Author: zyf0330): thanks for the text effects. About ~toInternalURL~, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15301238#comment-15301238 ] zhuisui edited comment on CB-11305 at 5/26/16 1:01 AM: --- thanks for the text effects. About ~toInternalURL~, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. was (Author: zyf0330): thanks for the text effects. About toInternalURL, I know it. I just don't know what it returns in this situation. If it is effective as cdvfile protocol, why can't put it into src of img directly. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15299957#comment-15299957 ] zhuisui edited comment on CB-11305 at 5/25/16 12:13 PM: I agree with you. Maybe we need a generic fs root mapped to "cordova.file.applicationDirectory". So before I send a PR, I think we should consider it more. Also, I touched Cordova and Android before less than two weeks. I am afraid I cannot qualified for this job. Finally, you mention that "image.toInternalURL()" works well on Android if I don't mistake. Then, I'm interested in what it is really like. I will see it another day. [~daserge] Could you tell me how to use MarkDown here? was (Author: zyf0330): I agree with you. Maybe we need a generic fs root mapped to `cordova.file.applicationDirectory`. So before I send a PR, I think we should consider it more. Also, I touched Cordova and Android before less than two weeks. I am afraid I cannot qualified for this job. Finally, you mention that `image.toInternalURL()` works well on Android if I don't mistake. Then, I'm interested in what it is really like. I will see it another day. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > Labels: android, reproduced, triaged, wfc > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297678#comment-15297678 ] zhuisui edited comment on CB-11305 at 5/24/16 8:57 AM: --- I just debug in src code and find this: I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. It is just like that most tasks are finished and just one hole is left. I cannot understand. Maybe it needs to test? was (Author: zyf0330): I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be accessed. That means app has no permission to access applicationStorageDirectory as "root/data/user/0/app-id/cache". > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297678#comment-15297678 ] zhuisui edited comment on CB-11305 at 5/24/16 8:21 AM: --- I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be accessed. That means app has no permission to access applicationStorageDirectory as "root/data/user/0/app-id/cache". was (Author: zyf0330): I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be access. That means app has no permission to access applicationStorageDirectory as "root/data/user/0/app-id/cache". > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297678#comment-15297678 ] zhuisui edited comment on CB-11305 at 5/24/16 5:46 AM: --- I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be access. That means app has no permission to access applicationStorageDirectory as "root/data/user/0/app-id/cache". was (Author: zyf0330): I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be access. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org
[jira] [Comment Edited] (CB-11305) use cdvfile: cannot import image or js
[ https://issues.apache.org/jira/browse/CB-11305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15297678#comment-15297678 ] zhuisui edited comment on CB-11305 at 5/24/16 5:44 AM: --- I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have set permission of storage to open. If I use "cdvfile://localhost/cache-external/path", it could be access. was (Author: zyf0330): I just debug in src code.Find these two things: 1. I change code in org.apache.cordova.file.AssetFilesystem.filesystemPathForURL(LocalFilesystemURL url) method, which was "return null" and is "return new File(rootUri.getPath(), url.path).toString()". Now "resourceApi.remapUri(origUri)" in SystemWebViewClient.shouldInterceptRequest() can return correct value of "cdvfile://localhost/assets/path" as "file:///android_asset/path", and script tag reads right content. 2.I use "cdvfile://localhost/temporary/path" which is related to correct path, but a IOException is thrown and message is "permission deny". I have open permission of storage. > use cdvfile: cannot import image or js > -- > > Key: CB-11305 > URL: https://issues.apache.org/jira/browse/CB-11305 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin File >Affects Versions: 6.2.0 > Environment: cordova 6.6.1 > android 5.1.1 >Reporter: zhuisui > > I use cdvfile://localhost/assets/path to show img and import js, and it > doesn't work. I haven't seen anything about using with assets, but > window.resolveLocalFileSystemURL can handle it to native URL > file:///android_asset/path, so I think it should be normal as expected. > And I didn't test about cdvfile://localhost/temporary|persistent. > And, I use cordova-cli 6.6.1, but it is not in "Affects Version/s". -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org