Commit Graph

333 Commits

Author SHA1 Message Date
Holger Weiss c9039a5ad2 Remove mod_mam_mnesia
Include a script and documentation for switching to the MAM module
shipped with ejabberd 15.06 and newer.
2016-03-08 00:14:25 +01:00
badlop 8c1df80794 Merge pull request #156 from who/master
Adding a default config for mod_rest
2016-03-07 16:39:57 +01:00
Holger Weiss 44ffde7eda Remove mod_http_upload
The HTTP upload modules are included with ejabberd 15.10 and newer.
2016-03-07 00:17:49 +01:00
Andrew B e2939a0353 Adding a default config for mod_rest 2016-03-04 11:59:49 -08:00
Mickaël Rémond e9a014a6cb Merge pull request #154 from saeed-rz/patch-1
change refer url for MOD_ARCHIVE_ODBC
2016-03-02 12:23:18 +01:00
Badlop 8c86849e86 Undefined macro 'NS_THUMBS_1' during module_install (thanks to ethoms)(#146) 2016-02-01 13:18:10 +01:00
Holger Weiss d73b648cf3 Merge branch 'http-upload'
* http-upload:
  mod_http_upload: Use application/octet-stream instead of text/html for security reasons
  mod_http_upload: Add note regarding "get_url"
  mod_http_upload: Use full PUT URL for process name
  mod_http_upload: Rename variable for clarity
  mod_http_upload: Fix logging of file size mismatch
  mod_http_upload: Return error atoms, not strings
  mod_http_upload: Log message if URL looks wrong
  mod_http_upload_quota: Don't track all users
  mod_http_upload: Make case indentation consistent
  mod_http_upload: Apply cosmetic changes
  mod_http_upload: Don't flatten command strings
  mod_http_upload: Don't let identify/1 return error
  mod_http_upload_quota: Omit info message
  mod_http_upload: Don't complain during shutdown
  mod_http_upload: Use binary strings in most places
  mod_http_upload: Check availability of ImageMagick
  mod_http_upload: Suppress error on non-image files
  mod_http_upload: Fix string()/binary() type issue
  mod_http_upload: Add/fix function specifications
  mod_http_upload: Strip newline from command output
  mod_http_upload: Support thumbnail generation
2016-01-12 00:05:05 +01:00
Matthias Rieber 4deb2fd2c3 mod_http_upload: Use application/octet-stream instead of text/html for security reasons 2016-01-11 23:54:13 +01:00
Holger Weiss 1696107f43 mod_http_upload: Add note regarding "get_url" 2016-01-11 23:54:08 +01:00
Holger Weiss d4d8b15413 mod_http_upload: Use full PUT URL for process name
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@/".
2016-01-11 23:50:15 +01:00
Holger Weiss 99d89ce59d mod_http_upload: Rename variable for clarity 2016-01-11 23:50:15 +01:00
Holger Weiss ce64f79b63 mod_http_upload: Fix logging of file size mismatch 2016-01-11 23:50:15 +01:00
Holger Weiss ddf70d60df mod_http_upload: Return error atoms, not strings
Don't convert error atoms to strings before actually logging them.  This
avoids a bogus error message when a user who has no uploaded files is
removed.
2016-01-11 23:50:15 +01:00
Holger Weiss f2f8fe25f7 mod_http_upload: Log message if URL looks wrong
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/"
2016-01-11 23:50:15 +01:00
Holger Weiss b6f5273228 mod_http_upload_quota: Don't track all users
Don't track the disk usage of accounts that have an unlimited quota.
2016-01-11 23:50:15 +01:00
Holger Weiss ea4964dccd mod_http_upload: Make case indentation consistent
Use four spaces (or the corresponding amount of tab characters) for case
indentation everywhere in mod_http_upload and mod_http_upload_quota.
2016-01-11 23:50:15 +01:00
Holger Weiss 0a24936e92 mod_http_upload: Apply cosmetic changes 2016-01-11 23:50:14 +01:00
Holger Weiss 0cfd521b7a mod_http_upload: Don't flatten command strings 2016-01-11 23:50:14 +01:00
Holger Weiss 8c470c6a01 mod_http_upload: Don't let identify/1 return error
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.
2016-01-11 23:50:14 +01:00
Holger Weiss 73e945fd1d mod_http_upload_quota: Omit info message
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.
2016-01-11 23:50:14 +01:00
Holger Weiss 1ee63657ac mod_http_upload: Don't complain during shutdown
Ignore the case where, for some reason, no process is found to be
stopped.

Closes #810.
2016-01-11 23:50:14 +01:00
Holger Weiss 9cd4e405c8 mod_http_upload: Use binary strings in most places
Switch to binary strings to fix a type issue, and for consistency.
2016-01-11 23:50:12 +01:00
Holger Weiss 5359525d3c mod_http_upload: Check availability of ImageMagick
Log an error message during startup if the thumbnail option is enabled
but ImageMagick is not installed.
2016-01-11 23:50:12 +01:00
Holger Weiss d46ee127e7 mod_http_upload: Suppress error on non-image files
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.
2016-01-11 23:50:12 +01:00
Holger Weiss 0b4e0e720e mod_http_upload: Fix string()/binary() type issue 2016-01-11 23:50:12 +01:00
Holger Weiss 08f7291a24 mod_http_upload: Add/fix function specifications 2016-01-11 23:50:12 +01:00
Holger Weiss d29795fb24 mod_http_upload: Strip newline from command output
The list_to_integer/1 function doesn't cope with trailing newline
characters.
2016-01-11 23:50:12 +01:00
Holger Weiss f6b66cd130 mod_http_upload: Support thumbnail generation
Import thumbnail support from the mod_http_upload version shipped with
ejabberd.
2016-01-11 23:50:03 +01:00
Badlop 0d2fa84c8a Update mod_rest as xml_stream:parse_element requires binary (#138) 2015-12-29 13:25:04 +01:00
Paweł Chmielowski ecf8db140d Merge pull request #141 from dunglas/patch-1
[doc] Mention to run modules_update_specs first
2015-12-23 13:33:58 +01:00
Kévin Dunglas 5ccefb0e9e [doc] Mention to run modules_update_specs first 2015-12-23 13:32:09 +01:00
Leon-SFS 55f08f9b43 change refer url for MOD_ARCHIVE_ODBC
change refer url for MOD_ARCHIVE_ODBC , the old url is not found.
2015-12-13 13:07:26 +03:30
Holger Weiss 195daf9fa1 Note that ejabberd 15.10 includes mod_http_upload
Closes #137.
2015-11-13 17:51:11 +01:00
Holger Weiss 567e19728c mod_http_upload: Remove outdated note from README
There's now a default value for the "docroot" option.
2015-11-04 00:54:59 +01:00
Holger Weiss 1ee52e2e42 mod_http_upload: Fix function specification 2015-10-26 22:39:58 +01:00
Holger Weiss c173ae9f36 mod_http_upload.yml: Enable mod_http_upload_quota
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.
2015-10-25 01:32:41 +02:00
Holger Weiss 4b0b66cfbf mod_http_upload: Apply minor cosmetic changes 2015-10-25 01:25:30 +02:00
Holger Weiss 9337b3ea39 mod_http_upload: Add Nginx configuration snippet
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.
2015-10-25 01:18:20 +02:00
Holger Weiss dd34fc63c8 mod_http_upload_quota: Log unexpected 'sweep'
Log an error message if the mod_http_upload_quota process receives a
'sweep' message despite the "max_days" option not being specified.
2015-10-25 00:56:05 +02:00
Holger Weiss 1ff5cbc467 mod_http_upload: Log descriptive error messages
Let file:format_error/1 translate error reasons into descriptive
strings.
2015-10-25 00:21:31 +02:00
Holger Weiss 4936e82bd1 mod_http_upload: Fix error message format string
The store_file/4 function might return non-string error information.
2015-10-25 00:18:11 +02:00
Holger Weiss eeba72cd4c mod_http_upload_quota: Fix "max_days" expiry run
Use the path names of old files to delete them (instead of the tuples
returned by the gather_file_info/1 function).
2015-10-24 23:49:02 +02:00
Holger Weiss 655f195e9d mod_http_upload_quota: Use timer for "max_days"
Simplify the code by using the timer module instead of the gen_server
timeout to trigger the "max_days" expiry run.
2015-10-24 23:23:26 +02:00
Holger Weiss 3652dd1796 mod_http_upload_quota: Mark unused variables 2015-10-24 18:31:16 +02:00
Holger Weiss b88e766571 mod_http_upload_quota: Don't forget to set timeout 2015-10-24 18:26:32 +02:00
Holger Weiss d4d5200c5b mod_http_upload_quota: Apply minor improvement 2015-10-24 16:35:04 +02:00
Holger Weiss e5eef02b25 mod_http_upload: Improve description of quotas 2015-10-24 16:33:26 +02:00
Holger Weiss c37387984a mod_http_upload: Apply minor cosmetic changes 2015-10-22 22:50:39 +02:00
Holger Weiss 511f0fa03d README.txt: Don't mention ejabberd.yml file
Modules are usually configured in separate configuration files, these
days.
2015-10-22 22:42:20 +02:00
Holger Weiss 157fd94c32 README.txt: Remove link to alternative protocol
Some users incorrectly assumed that mod_http_upload implements the
referenced protocol.
2015-10-22 22:24:34 +02:00