Closed cweiske closed 3 years ago
"application/octet-stream" looks fine to me. Well I can put it explicitly to the headers. Not sure if it helps.
But then the XMPP request must include the same mime type. Currently it's sending <content-type>image/jpeg</content-type>
.
oh I see. Let me reread the xep
https://xmpp.org/extensions/xep-0363.html#upload
The service SHOULD reject the file if the Content-Type has been specified beforehand and does not match.
When uploading a file via HTTP upload to my prosody xmpp server, I get an error:
In my server's error logs, I see
I am using prosody's https://modules.prosody.im/mod_http_upload_external.html with
share_v2.php
.The reason for the problem is that psi's http upload plugin does not send the
Content-Type
in the HTTP PUT request. This means that the server-sideshare_v2.php
script falls back to using "application/octet-stream" as mime type, and calculates the wrong signature.Psi's upload plugin already sends the correct mime type to the XMPP server to get the upload URL:
It just fails to submit it via the actual upload.
Versions: