mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +02:00
Merge pull request #506 from ParkedHampster/filename_extension
Bug: Filename Length
This commit is contained in:
commit
bd3909c7d7
2 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ post '/api/upload' do
|
||||||
end
|
end
|
||||||
|
|
||||||
if SiteFile.name_too_long? file[:filename]
|
if SiteFile.name_too_long? file[:filename]
|
||||||
api_error 400, 'file_name_too_long', "#{file[:filename]} filename is too long"
|
api_error 400, 'file_name_too_long', "#{file[:filename]} filename is too long (exceeds 255 characters)"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ class SiteFile < Sequel::Model
|
||||||
CLASSIFIER_LIMIT = 1_000_000
|
CLASSIFIER_LIMIT = 1_000_000
|
||||||
CLASSIFIER_WORD_LIMIT = 25
|
CLASSIFIER_WORD_LIMIT = 25
|
||||||
FILE_PATH_CHARACTER_LIMIT = 1200
|
FILE_PATH_CHARACTER_LIMIT = 1200
|
||||||
FILE_NAME_CHARACTER_LIMIT = 100
|
FILE_NAME_CHARACTER_LIMIT = 255
|
||||||
unrestrict_primary_key
|
unrestrict_primary_key
|
||||||
plugin :update_primary_key
|
plugin :update_primary_key
|
||||||
many_to_one :site
|
many_to_one :site
|
||||||
|
|
Loading…
Add table
Reference in a new issue