Skip to content

Commit

Permalink
Merge pull request #173 from DS2BRAIN/172-el163-test--add-ment-for-up…
Browse files Browse the repository at this point in the history
…load-size

172 (EL163) test & add ment for upload size of zip dataset file.
  • Loading branch information
dslabglobal authored Nov 3, 2022
2 parents ef8bc2f + ddc425c commit 8959474
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 39 deletions.
4 changes: 2 additions & 2 deletions frontend_app/src/language/translation.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1548,11 +1548,11 @@
"Drag a file or click here to upload it.": "Drag a file or click here to upload it.",
"Only 1 upload is allowed": "Only 1 upload is allowed",
"Drag a file or click the button below to upload it.": "Drag a file or click the button below to upload it.",
"Only CSV files of 2GB or less are supported. (Only 1 upload is allowed)": "Only CSV files of 2GB or less are supported. (Only 1 upload is allowed)",
"Only CSV files of 1GB or less are supported. (Only 1 upload is allowed)": "Only CSV files of 1GB or less are supported. (Only 1 upload is allowed)",
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/MP4 format. (Only 1 upload is allowed)": "You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/MP4 format. (Only 1 upload is allowed)",
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)": "You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)",
"You must have at least 10 images. Compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)": "You must have at least 10 images. Compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)",
"Only MP4 and MOV files under 5GB are supported. (Only 1 upload is allowed)": "Only MP4 and MOV files under 5GB are supported. (Only 1 upload is allowed)",
"Only MP4 and MOV files under 1GB are supported. (Only 1 upload is allowed)": "Only MP4 and MOV files under 1GB are supported. (Only 1 upload is allowed)",
"Only MP4 and MOV files are supported. (Only 1 upload is allowed)": "Only MP4 and MOV files are supported. (Only 1 upload is allowed)",
"(Only 1 upload is allowed)": "(Only 1 upload is allowed)",
"Uploaded File": "Uploaded File",
Expand Down
4 changes: 2 additions & 2 deletions frontend_app/src/language/translation.ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -1503,11 +1503,11 @@
"Drag a file or click here to upload it.": "파일을 끌어오거나 이곳을 클릭해서 업로드해 주세요.",
"Only 1 upload is allowed": "1개만 업로드 가능",
"Drag a file or click the button below to upload it.": "파일을 끌어오거나 아래 버튼을 클릭해서 업로드해 주세요.",
"Only CSV files of 2GB or less are supported. (Only 1 upload is allowed)": "2GB 이하의 CSV 파일만 지원합니다. (1개만 업로드 가능)",
"Only CSV files of 1GB or less are supported. (Only 1 upload is allowed)": "1GB 이하의 CSV 파일만 지원합니다. (1개만 업로드 가능)",
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/MP4 format. (Only 1 upload is allowed)": "최소 10장 이상의 이미지가 있어야합니다. 1GB 이하의 ZIP 파일만 업로드 가능하고, 압축된 이미지 파일은 PNG/JPG/JPEG/MP4 형식만 지원합니다. (1개만 업로드 가능)",
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)": "최소 10장 이상의 이미지가 있어야합니다. 1GB 이하의 ZIP 파일만 업로드 가능하고, 압축된 이미지 파일은 PNG/JPG/JPEG/GIF 형식만 지원합니다. (1개만 업로드 가능)",
"You must have at least 10 images. Compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)": "최소 10장 이상의 이미지가 있어야합니다. 압축된 이미지 파일은 PNG/JPG/JPEG/GIF 형식만 지원합니다. (1개만 업로드 가능)",
"Only MP4 and MOV files under 5GB are supported. (Only 1 upload is allowed)": "5GB 이하의 MP4, MOV 파일만 지원합니다. (1개만 업로드 가능)",
"Only MP4 and MOV files under 1GB are supported. (Only 1 upload is allowed)": "1GB 이하의 MP4, MOV 파일만 지원합니다. (1개만 업로드 가능)",
"Only MP4 and MOV files are supported. (Only 1 upload is allowed)": "MP4, MOV 파일만 지원합니다. (1개만 업로드 가능)",
"(Only 1 upload is allowed)": "(1개만 업로드 가능)",
"Uploaded File": "업로드된 파일",
Expand Down
50 changes: 16 additions & 34 deletions frontend_app/src/views/Dataconnector/DataModalsFileAdd.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,40 +641,22 @@ const DataModalFileAdd = ({
};

const dataTypeText = (type) => {
if (process.env.REACT_APP_ENTERPRISE === "true") {
if (type === "csv") {
return (
t("Each column requires at least 10 rows of data.") +
" " +
t("(Only 1 upload is allowed)")
);
} else if (type === "zip") {
return t(
"You must have at least 10 images. Compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)"
);
} else if (type === "video") {
return t(
"Only MP4 and MOV files are supported. (Only 1 upload is allowed)"
);
}
} else {
if (type === "csv") {
return (
t("Each column requires at least 10 rows of data.") +
" " +
t(
"Only CSV files of 2GB or less are supported. (Only 1 upload is allowed)"
)
);
} else if (type === "zip") {
return t(
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)"
);
} else if (type === "video") {
return t(
"Only MP4 and MOV files under 5GB are supported. (Only 1 upload is allowed)"
);
}
if (type === "csv") {
return (
t("Each column requires at least 10 rows of data.") +
" " +
t(
"Only CSV files of 1GB or less are supported. (Only 1 upload is allowed)"
)
);
} else if (type === "zip") {
return t(
"You must have at least 10 images. Only ZIP files of 1GB or less can be uploaded, and compressed image files are only supported in PNG/JPG/JPEG/GIF format. (Only 1 upload is allowed)"
);
} else if (type === "video") {
return t(
"Only MP4 and MOV files under 1GB are supported. (Only 1 upload is allowed)"
);
}
};

Expand Down
2 changes: 1 addition & 1 deletion frontend_app/src/views/Project/NewProject.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export default function NewProject({ history }) {
);
} else {
return t(
"Only CSV files of 2GB or less are supported. (Only 1 upload is allowed)"
"Only CSV files of 1GB or less are supported. (Only 1 upload is allowed)"
);
}
};
Expand Down

0 comments on commit 8959474

Please sign in to comment.