You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you check your logs in android studio?
In my logs there appeared an error The source url is not in the allow list ...
Somehow the allow list (previously the whitelist plugin, that is now included in cordova) didn't work for this plugin on my android installation, even when i allowed every url in my config <access origin="*" />.
My workaround for this:
(I used this command to install the plugin: cordova plugin add https://github.com/apache/cordova-plugin-file-transfer)
Open the FileTransfer.java in your android project and plugins folder (platforms/android/app/src/main/java/org/apache/cordova/filetransfer/FileTransfer.java and plugins/cordova-plugin-file-transfer/src/android/FileTransfer.java for angular with cordova)
Find following code snippet (in my project line 696):
if (!Boolean.TRUE.equals(shouldAllowRequest)) {
LOG.w(LOG_TAG, "The Source URL is not in the Allow List: '" + source + "'");
JSONObject error = createFileTransferError(CONNECTION_ERR, source, target, null, 401, null);
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
return;
}
Uncomment these lines or write your own allowed source url check
on android 10.0.0 using cordova-plugin-file-transfer 2.0.0-dev "File Transfer" and cordova-plugin-file 6.0.2 "File"
the upload from camera stoped working ... it worked before now with target 30 using android 10.0.0
i get Upload failed: Code = 1
using this code :
any clues ?
The text was updated successfully, but these errors were encountered: