Don't just use the "put_url" domain name, but also any path components
of the specified URL, to generate a mod_http_upload process name. This
way, a single domain name can be used for multiple virtual hosts by
specifying a "put_url" such as "https://example.com/@HOST@/".
Log an [info] message if a PUT request looks like the specified
"put_url" contains a path component that doesn't match the
"request_handlers" path, as in the following configuration:
listen:
-
module: ejabberd_http
port: 5444
request_handlers:
"/": mod_http_upload
modules:
mod_http_upload:
put_url: "http://example.com/path/"
Let identify/1 return 'pass' when it failed to identify the file type,
as this doesn't (necessarily) indicate an error condition. This also
makes it consistent with the return value of convert/2.
The mod_http_upload_quota module attempts to delete a directory whenever
it removes a file from that directory. However, if thumbnail creation
is enabled, directories will often contain two files. Therefore, don't
log an info (but only a debug) message if directory removal fails.
Don't log an error (but only a debug) message if ImageMagick fails to
indentify the file type for thumbnail creation. The image might be
encrypted, or it could be a non-image file.
Enable the mod_http_upload_quota module in the default configuration
snippet for mod_http_upload. The module won't actually delete any files
without additional configuration entries, though.
Include an example configuration snippet that shows how to tell Nginx to
1) proxy the HTTP PUT requests to mod_http_upload, and to
2) serve the HTTP GET requests directly.
The new mod_http_upload_quota module implements two features:
- When a "hard quota" is exceeded during a file upload, old files are
removed until the disk usage equals or falls below the "soft quota".
- Once a day, all uploaded files (and directories) older than a
configurable number of days are deleted.
Let mod_http_upload run an 'http_upload_slot_request' hook. If 'deny'
or an error element is returned, the request is rejected; if 'allow' is
returned, it is accepted.
If an HTTPS service_url is specified, start the 'asn1' application as
well, as 'public_key' depends on it.
Once mod_http_upload requires Erlang/OTP R16B02 or newer, we can use the
following calls instead:
{ok, _} = application:ensure_all_started(inets),
{ok, _} = application:ensure_all_started(ssl).