[refactor] File uploads - #12322
Open
SchrodingersGat wants to merge 10 commits into
Open
Conversation
✅ Deploy Preview for inventree-web-pui-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (94.11%) is below the target coverage (95.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #12322 +/- ##
==========================================
+ Coverage 83.20% 86.59% +3.39%
==========================================
Files 1393 1397 +4
Lines 91285 91509 +224
Branches 10588 10468 -120
==========================================
+ Hits 75950 79246 +3296
+ Misses 15270 12201 -3069
+ Partials 65 62 -3
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
matmair
reviewed
Jul 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR refactors how file uploads are handled:
In addition to reducing duplicated code (and potential bugs) - this PR can be used in the future to implement an auth check of uploaded files - and reject if the user does not have the required permissions to access those files. We can use the file path to determine the model type (and potentially ID) and then check if the user has the correct roles/permissions.
Tasks
upload_toendpoints