Skip to content

Commit

Permalink
Merge pull request #9 from spknetwork/feature/check-2-max-file-size
Browse files Browse the repository at this point in the history
Check 2 - Max File Size should not be more than 5 GB
  • Loading branch information
sag333ar committed Feb 28, 2024
2 parents 577f3c7 + 27c8c13 commit f9627de
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/services/uploader/uploading.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ export class UploadingService {
throw new Error('TestAuthorizationError');
}
if (uploadMetaData.Storage) {
if (uploadMetaData.Size >= 5000000000) {
throw new Error('File too big to be uploaded');
}
await this.uploadRepository.setStorageDetails(
uploadMetaData.MetaData.upload_id,
uploadMetaData.Storage.Path,
Expand Down

0 comments on commit f9627de

Please sign in to comment.