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

Deleted error is shown immediately after uploading a image #23

Closed
SnowCait opened this issue May 6, 2024 · 5 comments
Closed

Deleted error is shown immediately after uploading a image #23

SnowCait opened this issue May 6, 2024 · 5 comments
Assignees
Labels
awaiting confirmation bug Something isn't working

Comments

@SnowCait
Copy link
Contributor

SnowCait commented May 6, 2024

Describe the bug

"The requested file has been deleted" image is sometimes (10%+?) shown immediately after uploading a image.
After several minutes (not seconds), same URL shows the uploaded image correctly.

To Reproduce

  1. Upload image through API with NIP-96 flow
  2. Access the URL

Expected behavior

No error or show a proccessing image instead of a deleted image. (Sad if deleted😢)

Screenshots

Desktop (please complete the following information):

  • OS: Windows
  • Browser Chrome
  • Version 124.0.6367.119

Smartphone (please complete the following information):

Additional context

The time until correct image is shown seems to be consumed by converting process or something.

@quentintaranpino quentintaranpino self-assigned this May 20, 2024
@quentintaranpino
Copy link
Owner

First of all, I've been offline for a few weeks, sorry for the delay.

I'm going to check this out right now.

@quentintaranpino quentintaranpino added the bug Something isn't working label May 20, 2024
@quentintaranpino
Copy link
Owner

I have detected the problem. Somehow the redis cache does not allow to show the original file until the 300 seconds (5 minutes) of cache that I have specified in the server have passed.

To mitigate the problem I have lowered it to 10 seconds. Now I will continue working to solve it definitively.

Once again, sorry for any inconvenience caused.

@quentintaranpino
Copy link
Owner

The problem was because Nostter performs the GET of the uploaded file very fast, then my server does not mark the file as "active" until it has been processed, the first GET "marks" the file as not active for 5 minutes until the cache is cleared and then everything works.

It was clearly a design problem on my part with the flow of file uploads.

It should be fixed by now, can you try it on your end?

@SnowCait
Copy link
Contributor Author

Thank you! I'll keep an eye on it for a while.

@SnowCait
Copy link
Contributor Author

I've never seen deleted error these days🎉
Thanks again!

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
Projects
None yet
Development

No branches or pull requests

2 participants