mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
how am i still getting empty files.. how
This commit is contained in:
parent
b4e768d392
commit
ffaa6b2ac3
1 changed files with 4 additions and 4 deletions
8
app.rb
8
app.rb
|
@ -260,10 +260,10 @@ post '/site_files/upload' do
|
||||||
@errors = []
|
@errors = []
|
||||||
http_error_code = 406
|
http_error_code = 406
|
||||||
|
|
||||||
# if params[:newfile] == '' || params[:newfile].nil?
|
if params[:newfile] == '' || params[:newfile].nil?
|
||||||
# @errors << 'You must select a file to upload.'
|
@errors << 'You must select a file to upload.'
|
||||||
# halt http_error_code, slim(:'site_files/new')
|
halt http_error_code, 'Did not receive file upload.' # slim(:'site_files/new')
|
||||||
# end
|
end
|
||||||
|
|
||||||
if params[:newfile][:tempfile].size > Site::MAX_SPACE || (params[:newfile][:tempfile].size + current_site.total_space) > Site::MAX_SPACE
|
if params[:newfile][:tempfile].size > Site::MAX_SPACE || (params[:newfile][:tempfile].size + current_site.total_space) > Site::MAX_SPACE
|
||||||
@errors << 'File size must be smaller than available space.'
|
@errors << 'File size must be smaller than available space.'
|
||||||
|
|
Loading…
Add table
Reference in a new issue