Skip to content

Commit 9fdcb4f

Browse files
authored
Merge pull request #230 from dennismuench/master
startUpload: Prepare filePath scheme independent
2 parents 867ecd2 + b373cd7 commit 9fdcb4f

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)