Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BF36A1058A for ; Mon, 18 Nov 2013 08:57:28 +0000 (UTC) Received: (qmail 26657 invoked by uid 500); 18 Nov 2013 08:57:28 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 26574 invoked by uid 500); 18 Nov 2013 08:57:24 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 26555 invoked by uid 99); 18 Nov 2013 08:57:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Nov 2013 08:57:22 +0000 Date: Mon, 18 Nov 2013 08:57:22 +0000 (UTC) From: "julio cesar (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-5401) Plugin File Transfer does not work on Android 4.4 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-5401?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13825195#comment-13825195 ] julio cesar commented on CB-5401: --------------------------------- How do you get the file you want to upload? I think the problem is you get it from the new android 4.4 options, "recent", "drive", "images" or "downloads". There is an open issue with that: https://issues.apache.org/jira/browse/CB-5398 > Plugin File Transfer does not work on Android 4.4 > ------------------------------------------------- > > Key: CB-5401 > URL: https://issues.apache.org/jira/browse/CB-5401 > Project: Apache Cordova > Issue Type: Bug > Components: Android, Plugin File Transfer > Affects Versions: 3.4.0 > Reporter: Jean Carriere > > When using FileTransfer plugin to upload a file, I get an error on KitKat (the code works fine on android 4.3. > Here is the stack trace : > java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaDocumentsProvider uri content://com.android.providers.media.documents/document/image:5646 from pid=16183, uid=10093 requires android.permission.MANAGE_DOCUMENTS, or grantUriPermission() > E/FileTransfer(16183): at android.os.Parcel.readException(Parcel.java:1461) > E/FileTransfer(16183): at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:185) > E/FileTransfer(16183): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:148) > E/FileTransfer(16183): at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:682) > E/FileTransfer(16183): at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1063) > E/FileTransfer(16183): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:904) > E/FileTransfer(16183): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:831) > E/FileTransfer(16183): at org.apache.cordova.CordovaResourceApi.openForRead(CordovaResourceApi.java:245) > E/FileTransfer(16183): at org.apache.cordova.CordovaResourceApi.openForRead(CordovaResourceApi.java:204) > E/FileTransfer(16183): at org.apache.cordova.filetransfer.FileTransfer$1.run(FileTransfer.java:364) > E/FileTransfer(16183): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) > E/FileTransfer(16183): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) > E/FileTransfer(16183): at java.lang.Thread.run(Thread.java:841) > The js code is : > var options = new FileUploadOptions(); > options.fileKey = "file"; > options.fileName = imageURI.substr(imageURI.lastIndexOf('/') + 1); > options.mimeType = "image/jpeg"; > options.headers = { > Connection: "close" > }; > options.chunkedMode = false; > var params = {}; > params.token = config.token(); > options.params = params; > var ft = new FileTransfer(); > ft.upload(imageURI, config.serviceUrl() + "media/default", win, fail, options); -- This message was sent by Atlassian JIRA (v6.1#6144)