Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Nov 13, 2024
1 parent 635d4df commit 4f7f211
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions webui/src/pages/repositories/repository/objects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ const uploadFile = async (config, repo, reference, path, file, onProgress) => {
additionalHeaders["x-ms-blob-type"] = "BlockBlob";
console.log("Azure storage detected, setting BlockBlob header");
}

// Convert the file to a string for MD5 hashing
const arrayBuffer = await file.arrayBuffer();
const wordArray = CryptoJS.lib.WordArray.create(arrayBuffer);
Expand All @@ -249,17 +248,12 @@ const uploadFile = async (config, repo, reference, path, file, onProgress) => {
if (uploadResponse.status >= 400) {
throw new Error(`Error uploading file: HTTP ${uploadResponse.status}`);
}

await staging.link(repo.id, reference.id, fpath, getResp, md5Checksum, file.size, file.type);
} else {
console.log("Pre-sign support is disabled, using direct upload.");
await objects.upload(repo.id, reference.id, fpath, file, onProgress);
}

console.log("uploadFile completed successfully.");
};


const destinationPath = (path, file) => {
return `${path ? path : ""}${file.path.replace(/\\/g, '/').replace(/^\//, '')}`;
};
Expand Down

0 comments on commit 4f7f211

Please sign in to comment.