mirror of
https://github.com/neocities/neocities.git
synced 2025-08-04 08:42:00 +02:00
Restrict amount of files created per site
This commit is contained in:
parent
397f34a014
commit
784ba44785
4 changed files with 25 additions and 2 deletions
|
@ -124,6 +124,10 @@ post '/site_files/upload' do
|
|||
file_upload_response "File(s) do not fit in your available space, upload cancelled."
|
||||
end
|
||||
|
||||
if current_site.too_many_files? params[:files].length
|
||||
file_upload_response "Too many files, cannot upload"
|
||||
end
|
||||
|
||||
results = current_site.store_files params[:files]
|
||||
file_upload_response
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue