mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-04-28 00:02:49 +08:00
android: Fix error reporting for unknown uri type on sourceUri instead of targetUri
This commit is contained in:
@@ -713,7 +713,7 @@ public class FileTransfer extends CordovaPlugin {
|
||||
final boolean isLocalTransfer = !useHttps && uriType != CordovaResourceApi.URI_TYPE_HTTP;
|
||||
if (uriType == CordovaResourceApi.URI_TYPE_UNKNOWN) {
|
||||
JSONObject error = createFileTransferError(INVALID_URL_ERR, source, target, null, 0, null);
|
||||
Log.e(LOG_TAG, "Unsupported URI: " + targetUri);
|
||||
Log.e(LOG_TAG, "Unsupported URI: " + sourceUri);
|
||||
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.IO_EXCEPTION, error));
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user