yunohost icon indicating copy to clipboard operation
yunohost copied to clipboard

[xmpp] setup http_upload_external

Open larchange opened this issue 3 years ago • 4 comments

The problem

http upload is currently managed by metronome, but it's a deprecated part of metronome which has a limited mime types handling (For example pdf or doc file are not in the default handled mime types).

http upload is not the responsibility of metronome and need to be outsource.

Solution

use the external http upload way describe on metronome documentation.

PR Status

PENDING check/test/approval

How to test

  • Try to send a pdf file,
  • confirm the transfer failure
  • apply the patch
  • regenerate configurations for metronome and nginx
  • try to send again a pdf and other kinds of files
  • see the success .. or not !

larchange avatar Feb 10 '21 21:02 larchange

@maranda finally we may have external http upload @pitchum here the PR for you to test :) Let me know what piece of code if any are not at the correct locations.

larchange avatar Feb 10 '21 21:02 larchange

maybe we can add add_header Content-Security-Policy "default-src 'none'; frame-ancestors 'none';";

as advised in https://xmpp.org/extensions/xep-0363.html#server pointed by @randomstuff

larchange avatar Feb 12 '21 18:02 larchange

We should backup and restore the xmpp-upload dir and the secret you added.

zamentur avatar Mar 04 '21 13:03 zamentur

We should backup and restore the xmpp-upload dir and the secret you added.

Do we really want to backup the xmpp-upload folder ? if we spawn a new instance somewhere else, metronome will not keep track of the files, and they will stay forever in the folder ...

larchange avatar Mar 04 '21 18:03 larchange

I suggest to use this perl implementation instead https://github.com/weiss/ngx_http_upload . No new dependencies, no daemon to run.

There is also a flask implementation: https://github.com/horazont/xmpp-http-upload

In any case, Metronome should be a yunohost app, cause a lot of server don't use it.

zamentur avatar Dec 01 '22 14:12 zamentur

Closing because it's been 2 years and the plan is more to go towards metronome-as-an-app rather than handling all its complexity from YunoHost core ...

alexAubin avatar Jul 10 '23 17:07 alexAubin