Skip to content

Commit

Permalink
Allow zero-sized files
Browse files Browse the repository at this point in the history
We were rejecting files of size zero; this may have been due to a past
constraint within Permanent (and that constraint may still exist
somewhere in the backend), but we ultimately do want to let people
upload empty files since files of zero size can legitimately exist.

Issue #62 Support zero-sized files
  • Loading branch information
slifty committed Mar 30, 2023
1 parent 0e6d48b commit bbfed91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/validators/validateCreateFileDestinationUrlParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const validateCreateFileDestinationUrlParams = (
bucket: Joi.string().min(3, 'utf8').max(63, 'utf8').required(),
fileName: Joi.string().max(1024, 'utf8'),
fileType: Joi.string().required(),
maxSize: Joi.number().min(1).required(),
maxSize: Joi.number().min(0).required(),
path: Joi.string(),
}).validate(
data,
Expand Down

0 comments on commit bbfed91

Please sign in to comment.