Skip to content

Commit b373cd7

Browse files
authored
startUpload: Prepare filePath scheme independent
This change covers any alternative scheme as well as the use of CDVWKWebViewEngine on iOS (local web-server)
1 parent 867ecd2 commit b373cd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

www/FileTransferManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ FileTransferManager.prototype.startUpload = function (payload) {
5151

5252
var self = this
5353
window.resolveLocalFileSystemURL(payload.filePath, function (entry) {
54-
payload.filePath = entry.toURL().replace('file://', '')
54+
payload.filePath = new URL(entry.toURL()).pathname.replace(/^\/local-filesystem/, '')
5555
exec(self.callback, null, 'FileTransferBackground', 'startUpload', [payload])
5656
}, function () {
5757
self.callback({ id: payload.id, state: 'FAILED', error: 'File not found: ' + payload.filePath })

0 commit comments

Comments
 (0)