#3982 (Managing the files in the uploads folder)
by Luc Saffre · in Developers · assigned to Luc Saffre
Kurzbeschreibung
Kinder
Kommentare
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : I had a release in avanti where I tested this in production for their site. Seems to work nicely.
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : We don't need an urgent release on avanti with this change because even when we tidy up the uploads folder, we won't liberate enough disk space to continue the snapshot strategy for theyír backups They need a borg backup.
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : Seems that I got it done now. I started the -hopefully- last local test run before pushing my changes. The demo_bookings of ledger now uploads dummy pdf files for the last purchase invoices. The checkdata specs page now uses apc (which now uses the demo3 demo fixture, which creates an orphaned file ...
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : I wrote a fixture that uploads dummy files in order to test the new data checkers for uploads,
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : I wrote a first version of the UploadChecker. Next step is to play around, and to write a unit test case.
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : I read the Django docs about [url docs.djangoproject.com/en/3.1/topics/http/file-uploads/ File Uploads]. Good to know. But no answer yet about how I can protect end users from killing their server by uploading a huge file.
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : Second step : add a new new field file_size, plugin settings max_file_size and upload_to_spec. Model.save_new_instance() now always calls elem.full_clean() in order to raise a ValidationError if the size is too big. Unfortunately this happens only when the file has already been uploaded, so I hope t...
- 5 Jahre, 8 Monate ago von Luc Saffre about #3982 (Managing the files in the uploads folder) : First step: moved the Upgradable mixin from lino.mixins to lino.modlib.uploads.mixins.UploadBase.