Set the uploaded file path to site/temp by default. Can be set via configuration with "temp-dir" variable.
(This is important, otherwise it uses the current working directory, but for fcgi, this is not always obvious where it is.) Allow advanced upload, and also basic html upload, in case the dropzone.js has trouble. Split get and post handling for files module upload request.
This commit is contained in:
@@ -2,8 +2,8 @@ note
|
||||
description: "[
|
||||
Class that enable to set basic configuration, application environment, core modules and themes.
|
||||
]"
|
||||
date: "$Date: 2015-02-13 13:08:13 +0100 (ven., 13 févr. 2015) $"
|
||||
revision: "$Revision: 96616 $"
|
||||
date: "$Date$"
|
||||
revision: "$Revision$"
|
||||
|
||||
deferred class
|
||||
CMS_SETUP
|
||||
@@ -70,6 +70,13 @@ feature {NONE} -- Initialization
|
||||
files_location := site_location.extended ("files")
|
||||
end
|
||||
|
||||
-- Location for temp files
|
||||
if attached text_item ("temp-dir") as l_temp_dir then
|
||||
create temp_location.make_from_string (l_temp_dir)
|
||||
else
|
||||
temp_location := site_location.extended ("temp")
|
||||
end
|
||||
|
||||
-- Location for modules folders.
|
||||
if attached text_item ("modules-dir") as l_modules_dir then
|
||||
create modules_location.make_from_string (l_modules_dir)
|
||||
@@ -314,6 +321,10 @@ feature -- Access: Theme
|
||||
site_location: PATH
|
||||
-- Path to CMS site root dir.
|
||||
|
||||
temp_location: PATH
|
||||
-- Path to folder used as temporary dir.
|
||||
-- (Mainly for uploaded file).
|
||||
|
||||
files_location: PATH
|
||||
-- Path to public "files" dir.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user