I'm not familiar with Django.
Maybe the
Normally it should not, because the print function does not consume generators.
In the documentation they write, that the method
It the method returns a generator, which is consumed by the for-loop.
The for-loop itself should not cause this issue. For each iteration you get a new chunk
and the old chunk object is garbage collected.
Maybe you overwrite at some other place your settings. Does it work with small uploads?
Maybe the
print(f.chunks())
causes the MemoryError
.Normally it should not, because the print function does not consume generators.
In the documentation they write, that the method
UploadedFile.chunks()
should used always.It the method returns a generator, which is consumed by the for-loop.
The for-loop itself should not cause this issue. For each iteration you get a new chunk
and the old chunk object is garbage collected.
Maybe you overwrite at some other place your settings. Does it work with small uploads?
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!