MongoEngine / MongoEngine/mongoengine
File not added via stream on existing object.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.3k
- Forks
- 1.2k
- Avg merge
- 4h 41m
- Merged PRs (30d)
- 11
Description
Hi,
First of all thanks for writing this package. It helps me a lot!
Unfortunately I think I found an issue related to FileField. I am trying to add a file to an existing document using the stream method (I cannot use put() because my file can be very big). I have written a test that show what I am trying to do. It is available here and can serve as the base for a pull request:
https://github.com/nicolasdespres/mongoengine/commit/8778399858bcb37e1c155be1d2a9cd26b192670f
I am expected to have the file saved and attached to my document but what I see is that it is saved but not attached. Note that it works using put().
I did not find a fix. Any help would be grateful.
Thanks,
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the test linked in commit 8778399858bcb37e1c155be1d2a9cd26b192670f and trace the FileField stream method for an existing document, comparing it with put(). Done means the streamed file is both saved and attached to the existing document.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mongodb, python
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100