mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
catch weird upload error
This commit is contained in:
parent
b559ed98c0
commit
76dd51ca7c
1 changed files with 4 additions and 0 deletions
4
app.rb
4
app.rb
|
@ -438,6 +438,10 @@ post '/site_files/upload' do
|
|||
@errors = []
|
||||
http_error_code = 406
|
||||
|
||||
if params[:files].nil?
|
||||
file_upload_response "Uploaded files were not seen by the server, cancelled. We don't know what's causing this yet. Please contact us so we can help fix it. Thanks!"
|
||||
end
|
||||
|
||||
params[:files].each do |file|
|
||||
if current_site.file_size_too_large? file[:tempfile].size
|
||||
file_upload_response "#{file[:filename]} is too large, upload cancelled."
|
||||
|
|
Loading…
Add table
Reference in a new issue