GithubHelp home page GithubHelp logo

Comments (10)

mwild1 avatar mwild1 commented on May 20, 2024 4

Hey, Prosody dev here. I agree the XEP is unclear on this point. The XEP author has stated that hosting on a domain is reasonable.

Prosody supports hosting the uploads wherever the admin configures it. Due to the XEP ambiguity and the number of clients that have had this same issue, we now tell people explicitly in the mod_http_upload documentation that it must be on a subdomain.

If anyone cares strongly about this issue, please push an update to the XEP and then chase clients. SIskin is just one more client that only checks subdomains, and it won't be the last unless the XEP is fixed.

Right now the easiest solution is just to switch your server to hosting on a subdomain.

EDIT: Added link to documentation.

from siskin-im.

alexmat avatar alexmat commented on May 20, 2024

2ab387d2_pxyiiQz0SciJjFmWESUx8Q

from siskin-im.

hantu85 avatar hantu85 commented on May 20, 2024

Is XMPP HTTP File Upload component configured as a separate component (JID of a subdomain of XMPP server domain) or this feature is advertised on the XMPP domain (not a subdomain)?

I recall the issue with some other Prosody server that had configured HTTP File Upload on the server domain (not a subdomain) and as a result file upload failed. According to the XEP-0363, HTTP File Upload should be hosted on a subdomain, see https://xmpp.org/extensions/xep-0363.html#disco

from siskin-im.

alexmat avatar alexmat commented on May 20, 2024

Looks like I had the component configured as a module in Prosody. I deleted it from my modules list and have added the following to the config:

Component "upload.mydomain" "http_upload_external" http_upload_external_base_url = "https://mydomain/upload/" ...

The file transfer now works, but I now get a Warning:

"File upload completed but it was not confirmed correctly by your server, do you wish to proceed?"

Hitting yes sends the file without issue.

Is there anything I can do to fix the warning?

from siskin-im.

woj-tek avatar woj-tek commented on May 20, 2024

This is because HTTP Upload component responds with status 200 instead of 201 from specification:

There is no further XMPP communication required between the upload service and the client. A HTTP status Code of 201 means that the server is now ready to serve the file via the provided GET URL.

While 200 also means "OK" we try to adhere to what the XEP says. We decided to show this dialogue in this case.

from siskin-im.

alexmat avatar alexmat commented on May 20, 2024

Understood. Looks like prosody-filer was recently updated to handle that and I just missed the update: https://github.com/ThomasLeister/prosody-filer/releases/tag/v1.0.2

Thank you for your patience and explaining the solution in detail.

from siskin-im.

mimi89999 avatar mimi89999 commented on May 20, 2024

According to the XEP-0363, HTTP File Upload should be hosted on a subdomain, see https://xmpp.org/extensions/xep-0363.html#disco

@hantu85 Which part of the XEP says that? Also, SHOULD is not MUST. I don't know any other client that has issues with it. Conversations, Gajim, ChatSecure, Dino were able to use it even if it is on the same domain.

from siskin-im.

hantu85 avatar hantu85 commented on May 20, 2024

@mimi89999 According to the example. In the XEP actually there is no mention of how to discover that feature, only "use service discovery". Should I use it on the domain? on all components listed by the server? or maybe on the user account? that is not mentioned anywhere in the XEP which entities should be queried for their features to find HTTP File Upload feature. The only guideline to that is an example which we followed.

from siskin-im.

woj-tek avatar woj-tek commented on May 20, 2024

@mimi89999 there is this passage: "A user’s server SHOULD include any known entities that provide such services into its service discovery items." which would indicate that it should not be expected on the main domain.

There was an attempt to clarify it: xsf/xeps#682 but it was closed and in the end it remained as-is...

from siskin-im.

m4rkell avatar m4rkell commented on May 20, 2024

Looks like I had the component configured as a module in Prosody. I deleted it from my modules list and have added the following to the config:

Component "upload.mydomain" "http_upload_external" http_upload_external_base_url = "https://mydomain/upload/" ...

The file transfer now works, but I now get a Warning:

"File upload completed but it was not confirmed correctly by your server, do you wish to proceed?"

Hitting yes sends the file without issue.

Is there anything I can do to fix the warning?

This is work!!! :) Thank you!

from siskin-im.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.