Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload media returns wrong processing_url #34

Open
MaTeS72 opened this issue Dec 15, 2024 · 5 comments
Open

Upload media returns wrong processing_url #34

MaTeS72 opened this issue Dec 15, 2024 · 5 comments
Assignees
Labels
awaiting confirmation bug Something isn't working documentation Improvements or additions to documentation

Comments

@MaTeS72
Copy link

MaTeS72 commented Dec 15, 2024

Describe the bug
When I upload a larger image via Media upload, the upload request returns a processing_url. However, the processing_url is in a different format than what is described in the documentation. In the documentation, the format is "https://nostrcheck.me.com/api/v2/media/3225," but for me, it appears as "https://nostrcheck.me.com/3225." When I try to check the status of the image, the response is: "Auth header (NIP98) event endpoint is not valid: https://cdn.nostrcheck.me/141473." However, when I format the URL according to the documentation, it works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Upload some larger image via Media upload API
  2. Try to request the processing URL

Expected behavior
The processing_url should be returned in the format specified in the documentation.

Screenshots
Screenshot 2024-12-15 at 17 39 09
Screenshot 2024-12-15 at 17 56 49

Desktop (please complete the following information):

  • OS: macos
  • Browser firefox
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: iPhone 15 pro
  • OS: ios 18.1
  • Browser safari
  • Version X
@quentintaranpino quentintaranpino self-assigned this Dec 15, 2024
@quentintaranpino quentintaranpino added bug Something isn't working documentation Improvements or additions to documentation labels Dec 15, 2024
@quentintaranpino
Copy link
Owner

Hello, can you send me the complete message returned by the server?

"RES -> 400 Bad request - Auth header (NIP98) event endpoint is not valid", eventEndpoint, "<>", ServerEndpoint, "|", getClientIp(req));

The ServerEndpoint that the server expects should also appear in the response.

Thank you!

@MaTeS72
Copy link
Author

MaTeS72 commented Dec 15, 2024

Hey,
thanks for the quick response. Sorry, should have sent this in the first place. This is the response. Auth header (NIP98) event endpoint is not valid: https://cdn.nostrcheck.me/141512 <> https://cdn.nostrcheck.me/api/v2/media/141512

@quentintaranpino
Copy link
Owner

Are you using the endpoint https://cdn.nostrcheck.me/{id} with the GET method to check the file status? Or are you instead using https://nostrcheck.me/api/v2/{id}?

In theory, if you use the endpoint that returns processing_url and construct a NIP98 header following the specifications, it should work for you.

Both endpoints lead to the same site, but the 'u' tag in the NIP98 header must match.

On my end, I’ll review the documentation; there’s probably an issue there as well.

@MaTeS72
Copy link
Author

MaTeS72 commented Dec 16, 2024

I use the https://cdn.nostrcheck.me/{id} which is returned as processing_url and then I construct the NIP98 header with this url in 'u' tag. And send the GET request to this url and receives the error. On the other hand if I modify the url like this https://nostrcheck.me/api/v2/media/$id, construct NIP98 and send the request, it works.

@quentintaranpino
Copy link
Owner

Temporary solution applied, waiting until it can be resolved definitively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting confirmation bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants