Skip to content

Commit

Permalink
Merge pull request #230 from dennismuench/master
Browse files Browse the repository at this point in the history
startUpload: Prepare filePath scheme independent
  • Loading branch information
zfir authored Jun 28, 2022
2 parents 867ecd2 + b373cd7 commit 9fdcb4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/FileTransferManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ FileTransferManager.prototype.startUpload = function (payload) {

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

0 comments on commit 9fdcb4f

Please sign in to comment.