fix: code crash with a geojson > 2.5Mo after a conflict#3141
Merged
Conversation
In case of merge conflict, we try to resolve the conflict and then we replace the geojson sent by the user by the merged one. Until now we were doing it by relying on the InMemoryUploadedFile API, but when the sent file is larger than 2.5Mo Django use another class (NamedTemporaryFile), which has another API. So we cannot simply replace the file attribute, which is not the same in both cases.
Member
Author
|
Eg. of traceback from osmfr server when the original issue happens: |
davidbgk
reviewed
Jan 8, 2026
davidbgk
approved these changes
Jan 8, 2026
davidbgk
left a comment
Contributor
There was a problem hiding this comment.
Would it be pertinent to bump FILE_UPLOAD_MAX_MEMORY_SIZE a bit too?
Co-authored-by: David Larlet <3556+davidbgk@users.noreply.github.com>
Member
Author
Humm, what for ? 🤔 |
Contributor
Not sure what's more efficient on today's hardware. |
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.
In case of merge conflict, we try to resolve the conflict and then we replace the geojson sent by the user by the merged one. Until now we were doing it by relying on the InMemoryUploadedFile API, but when the sent file is larger than 2.5Mo Django use another class (NamedTemporaryFile), which has another API. So we cannot simply replace the file attribute, which is not the same in both cases.