Skip to content

Commit

Permalink
[ISSUE-192] Remove the front-end validation of file formats
Browse files Browse the repository at this point in the history
  • Loading branch information
Moyee authored Oct 10, 2023
1 parent 4d590d4 commit dbf759d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,7 @@ export const AddTemplateModal: React.FC<AddTemplateProps> = ({
};

const props = {
beforeUpload: (file) => {
const isJar = file.type === "application/java-archive";
if (!isJar) {
message.error(
$i18n.get(
{
id: "openpiece-geaflow.geaflow.function-manage.uploadModal.FilenameIsNotAJar",
dm: "{fileName} 不是jar文件类型!",
},
{ fileName: file.name }
)
);
return Upload.LIST_IGNORE;
}
beforeUpload: () => {
return false;
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,7 @@ const CreateCompute = ({ handleCancel, instance, files, handleSuccess }) => {
};

const props = {
beforeUpload: (file: any) => {
const isJar = file.type === "application/java-archive";
if (!isJar) {
message.error(
$i18n.get(
{
id: "openpiece-geaflow.geaflow.function-manage.uploadModal.FilenameIsNotAJar",
dm: "{fileName} 不是jar文件类型!",
},
{ fileName: file.name }
)
);
return Upload.LIST_IGNORE;
}
beforeUpload: () => {
return false;
},
};
Expand Down

0 comments on commit dbf759d

Please sign in to comment.