Skip to content

Commit

Permalink
avniproject/avni-server#758 | Show friendly error message for bundle …
Browse files Browse the repository at this point in the history
…upload file name with more than 1 extensions
  • Loading branch information
1t5j0y committed Aug 5, 2024
1 parent b55378d commit c91cad1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/upload/Dashboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const Dashboard = ({ getStatuses, getUploadTypes, uploadTypes = new UploadTypes(
const uploadFile = async () => {
const [ok, error] = await api.bulkUpload(getUploadTypeCode(uploadType), file, autoApprove, mode, hierarchy || 0);
if (!ok && error) {
alert(error);
if (error === "Double extension file detected") {
alert("Please rename " + file.name + " to have a single extension and try again.");
} else {
alert(error);
}
}
setFile();
setUploadType("");
Expand Down

0 comments on commit c91cad1

Please sign in to comment.