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:
2016-09-26 10:37:41 +02:00
parent b1478cfb8a
commit 0c3b85bb37
4 changed files with 95 additions and 29 deletions

View File

@@ -14,6 +14,7 @@ inherit
undefine
requires_proxy
redefine
execute,
create_router, router,
execute_default,
filter_execute,
@@ -26,6 +27,8 @@ inherit
WSF_ROUTED_URI_TEMPLATE_HELPER
WSF_REQUEST_EXPORTER
REFACTORING_HELPER
SHARED_LOGGER
@@ -193,7 +196,20 @@ feature -- Settings: router
a_router.handle ("/", fhdl, router.methods_GET)
end
feature -- Execute Filter
feature -- Request execution
initialize_execution
-- Initialize CMS execution.
do
request.set_uploaded_file_path (api.temp_location)
end
execute
-- <Precursor>.
do
initialize_execution
Precursor
end
filter_execute (req: WSF_REQUEST; res: WSF_RESPONSE)
-- Execute the filter.