Skip to content

Commit

Permalink
HTTP
Browse files Browse the repository at this point in the history
  • Loading branch information
ItamarYuran committed Dec 10, 2024
1 parent 2917355 commit e767f86
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions webui/src/pages/repositories/repository/objects.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,7 @@ const uploadFile = async (config, repo, reference, path, file, onProgress) => {
const checksum = extractChecksumFromResponse(parsedHeaders);
await staging.link(repo.id, reference.id, fpath, getResp, checksum, file.size, file.type);
} catch(error) {
if (error.status >= 400) {
throw new Error(`Error uploading file: HTTP ${error.status}`);
}
if (error.status === 0) {
throw new Error(`CORS settings error. Check documentation for more info.`);
}
throw error;
throw new Error(`Error uploading file- HTTP ${error.status}${error.response ? `: ${error.response}` : ''}`);
}
} else {
await objects.upload(repo.id, reference.id, fpath, file, onProgress);
Expand Down

0 comments on commit e767f86

Please sign in to comment.