mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
django: Improve handling of file uploads
1. Set temporary directory to /var/tmp 2. Drop MemoryFileUploadHandler Tests: - During upload notice that file are in /var/tmp/system-private... folder instead of /var/tmp. - Upload a file but rename with another extension instead of moving to destination through changes in code. Notice that the file is available in /var/tmp/systemd-private... directory after the upload operation is completed. Stop the service and notice that the file has been deleted. Folder is empty after the service starts again. Signed-off-by: Joseph Nuthalapati <njoseph@riseup.net> [sunil: Add PrivateTmp=yes in plinth.service file] [sunil: Update comments] Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org> Reviewed-by: Veiko Aasa <veiko17@disroot.org>
This commit is contained in:
1 parent
03f62f01e8
commit
21f6c9128f
2 files changed
+18
No files matched your search
@@ -15,6 +15,7 @@ User=plinth
|
||||
Group=plinth
|
||||
StandardOutput=null
|
||||
StandardError=null
|
||||
PrivateTmp=yes
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user