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

ImageShare is unable to upload to Imgur API #19

Closed
corbindavenport opened this issue May 16, 2023 · 2 comments
Closed

ImageShare is unable to upload to Imgur API #19

corbindavenport opened this issue May 16, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@corbindavenport
Copy link
Owner

The production version of ImageShare is currently unable to upload images to Imgur, because the API returns this error:

string(109) "{"data":{"error":"Imgur is temporarily over capacity. Please try again later."},"success":false,"status":403}"

My local setup with the same Docker container and same API key still works, so I assume this is a (hopefully unintentional) IP block. I've updated the upload code to use binary files instead of base64-encoded images, and tried moving the server to a different DigitalOcean region, but nothing changed there. I also rolled out basic error handling, so ImageShare won't silently fail when an upload fails (which was generating a QR code that linked to the Imgur home page).

This shouldn't be related to Imgur's terms of service change:

There are no planned upcoming changes to Imgur’s API offerings. With this update, we are focused on the content that is uploaded to Imgur, not how the content is uploaded to Imgur

I'll update this thread as I investigate other solutions.

@corbindavenport corbindavenport added the bug Something isn't working label May 16, 2023
@corbindavenport corbindavenport self-assigned this May 16, 2023
@corbindavenport
Copy link
Owner Author

I've rolled out a temporary fix that uploads images to imgbb.com when the Imgur API fails, like the original version of ImageShare. The production server is now using the imgbb-support branch with those changes. ImgBB doesn't support anonymous uploads in the same way as Imgur, so as a half-solution, images are deleted after 120 seconds.

The code is pretty messy, and the privacy policy and other pages need to be updated to explain the differences. If there aren't any issues, I can look into adding ImgBB as a permanent image host option. That will probably require the user to provide their own API key, so pictures are tied to their account instead of the ImageShare account.

@corbindavenport
Copy link
Owner Author

Imgur API suddenly started working again a while ago, and I haven't noticed it break again. I'm leaving the production server on the imgbb-support branch for now, but this issue can be closed.

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

No branches or pull requests

1 participant