ImperialCollegeLondon / django-drf-filepond

A Django app providing a server implemention for the Filepond file upload library
BSD 3-Clause "New" or "Revised" License
105 stars 40 forks source link

Use shutil.move instead of copy2 to move files to local storage #93

Open blattms opened 1 year ago

blattms commented 1 year ago

For large files copying takes a lot of time and the request of the pgina filepond client time out. Therefore we resort to using shutil.move.

The OS should prefer to rename in this case if source and destination are on the same file system. At least on a Linux server this speeds up the moving from temporary to permanent storage tremendously.