Skip to content

Commit

Permalink
SK-1537 restrict file types to uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
skyflow-bharti committed Jul 2, 2024
1 parent 5def3c0 commit 1f3620f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utils/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export const fileValidation = (value, required: Boolean = false, fileElement) =>

if (Object.prototype.hasOwnProperty.call(fileElement, 'allowedFileType') && (value !== undefined && value !== '')) {
let isValidType = false;

if (fileElement.allowedFileType !== null && fileElement.allowedFileType !== undefined) {
fileElement.allowedFileType.forEach((type) => {
const allowedType = getType(type);
Expand Down

0 comments on commit 1f3620f

Please sign in to comment.