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

♻️ Refactor upload image and add max_size #449

Merged
merged 5 commits into from
Sep 19, 2024
Merged

Conversation

JMicheli
Copy link
Collaborator

As I was reading through the code while preparing to eventually handle the file upload/deletion/bulk management features, I happened on some code for uploading images with a todo marked asking to eventually add configurable max size.

That was easy enough, so I added it as a configuration variable with a default value equal to the prior 20 MB hard-coded limit. I also took the opportunity to refactor the code in the upload module so that it can be more easily reused when other upload types are added.

Copy link

codecov bot commented Sep 18, 2024

Copy link
Collaborator

@aaronleopold aaronleopold left a comment

Choose a reason for hiding this comment

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

This looks great! There were a couple of my old TODOs which could be cleaned up I think, but otherwise this looks good to me

apps/server/src/utils/upload.rs Outdated Show resolved Hide resolved
.github/workflows/ci.yaml Show resolved Hide resolved
@JMicheli JMicheli merged commit 488f37e into develop Sep 19, 2024
8 checks passed
@aaronleopold aaronleopold mentioned this pull request Oct 11, 2024
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.

2 participants