Skip to content

Commit

Permalink
fix upload regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ianopolous committed Nov 3, 2024
1 parent 3e77195 commit 6396911
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/sandbox/AppInstall.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ module.exports = {
file.getInputStream(that.context.network, that.context.crypto, fileProps.sizeHigh(), fileProps.sizeLow(), function(read){})
.thenApply(function(reader) {
filesProcessedCounter++;
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(fileProps.name, reader,
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(fileProps.name, {get_0: () => reader},
(fileProps.size_0 - (fileProps.size_0 % Math.pow(2, 32))) / Math.pow(2, 32), fileProps.size_0, false,
true, x => {});
fileUploadList.push(fup);
Expand Down
2 changes: 1 addition & 1 deletion src/views/Calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ module.exports = {
foundDirectoryIndex = uploadParams.uploadPaths.length -1;
}
let reader = new peergos.shared.user.fs.AsyncReader.ArrayBacked(bytes);
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(filename, reader,
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(filename, {get_0: () => reader},
(fileSize - (fileSize % Math.pow(2, 32))) / Math.pow(2, 32), fileSize, false,
true, updateProgressBar);
let fileUploadList = uploadParams.fileUploadProperties[foundDirectoryIndex];
Expand Down
6 changes: 3 additions & 3 deletions src/views/Drive.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2122,7 +2122,7 @@ module.exports = {
}
let reader = new browserio.JSFileReader(file);
let java_reader = new peergos.shared.user.fs.BrowserFileReader(reader);
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(file.name, java_reader,
let fup = new peergos.shared.user.fs.FileWrapper.FileUploadProperties(file.name, {get_0: () => java_reader},
(file.size - (file.size % Math.pow(2, 32))) / Math.pow(2, 32), file.size, false,
overwriteExisting ? true : false, updateProgressBar);
Expand Down Expand Up @@ -2961,7 +2961,7 @@ module.exports = {
let appManifest = convertToByteArray(manifestUint8Array);
let manifestReader = new peergos.shared.user.fs.AsyncReader.ArrayBacked(appManifest);
let manifestProps =
new peergos.shared.user.fs.FileWrapper.FileUploadProperties("peergos-app.json", manifestReader, 0,
new peergos.shared.user.fs.FileWrapper.FileUploadProperties("peergos-app.json", {get_0: () => manifestReader}, 0,
manifestUint8Array.byteLength, false, true, x => {});
let html = '<!DOCTYPE html>\n' +
'<html lang="en">\n' +
Expand All @@ -2978,7 +2978,7 @@ module.exports = {
let appIndexPage = convertToByteArray(indexUint8Array);
let indexReader = new peergos.shared.user.fs.AsyncReader.ArrayBacked(appIndexPage);
let indexPageProps =
new peergos.shared.user.fs.FileWrapper.FileUploadProperties("index.html", indexReader, 0,
new peergos.shared.user.fs.FileWrapper.FileUploadProperties("index.html", {get_0: () => indexReader}, 0,
indexUint8Array.byteLength, false, true, x => {});
let folderUPList = [];
let appFolderProps = new peergos.shared.user.fs.FileWrapper.FolderUploadProperties(
Expand Down

0 comments on commit 6396911

Please sign in to comment.