Python read/write vs shutil copy
Python read/write vs shutil copy Question: I need to save files uploaded to my server (Max file size is 10MB) and found this answer, which works perfectly. However, I’m wondering what is the point of using the shutil module, and what is the difference between this: file_location = f"files/{uploaded_file.filename}" with open(file_location, "wb+") as file_object: file_object.write(uploaded_file.file.read()) …