Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deny past future duration filesize #70

Merged
merged 7 commits into from
Feb 13, 2024

Conversation

Tooseriuz
Copy link
Member

@Tooseriuz Tooseriuz commented Feb 13, 2024

✅ DoD

(use n/a when API docs (Release notes, etc) do not need to be updated)

📝 Summary

duration, fileSize as Optional because this gonna be released before Uploader release

  • Add duration, fileSize to GET /uploads params.
  • Deny upload with timestamp is future
  • Deny upload with timestamp is past older than year 1971
  • Deny upload with duration is more than 1 hour
  • Deny upload with fileSize is more than 150MB for flac and 200MB for wav

Deny upload with `timestamp` is future
Deny upload with `timestamp` is past older than year 1971
Deny upload with `duration` is more than 1 hour
Deny upload with `fileSize` is more than 150MB for flac and 200MB for wav
@Tooseriuz Tooseriuz self-assigned this Feb 13, 2024
docs/requestBodies.json Outdated Show resolved Hide resolved
routes/uploads.int.test.js Outdated Show resolved Hide resolved
routes/uploads.int.test.js Show resolved Hide resolved
routes/uploads.int.test.js Show resolved Hide resolved
routes/uploads.js Outdated Show resolved Hide resolved
routes/uploads.js Outdated Show resolved Hide resolved
routes/uploads.js Outdated Show resolved Hide resolved
Add minimum value to `duration` and `fileSize`
Add test cases for `duration` and `fileSize` is 0
Add happy test cases for `duration` and `fileSize`
Copy link
Contributor

@rassokhin-s rassokhin-s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@Tooseriuz Tooseriuz merged commit 98d4838 into develop Feb 13, 2024
1 check passed
@Tooseriuz Tooseriuz deleted the feature/deny-past-future-duration-filesize branch February 13, 2024 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent user to upload files with past and future timestamps
2 participants