Home > other >  Everyone a great god, django memory problems and answer questions
Everyone a great god, django memory problems and answer questions

Time:09-16

When my django back-end receive front-end submission file
Views:
The file=request. FILES. Get (' file ')

This file is directly put into the memory
Because I use the file. The read () can be directly to print out the file content
Then I need not to need to open/close the file with the file. The close () to close him?
If you don't shut down when the client disconnected links will automatically release the memory?

Thank god first answer

CodePudding user response:

The file=request. FILES. Get (' file ')
Should be in the memory, can be read without initiative to close the file

As for when to release the memory, this is python mechanism, need not willing to consider,
  • Related