mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +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
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ class SiteFile < Sequel::Model
|
|||
CLASSIFIER_LIMIT = 1_000_000
|
||||
CLASSIFIER_WORD_LIMIT = 25
|
||||
FILE_PATH_CHARACTER_LIMIT = 1200
|
||||
FILE_NAME_CHARACTER_LIMIT = 100
|
||||
FILE_NAME_CHARACTER_LIMIT = 255
|
||||
unrestrict_primary_key
|
||||
plugin :update_primary_key
|
||||
many_to_one :site
|
||||
|
|
Loading…
Add table
Reference in a new issue