BeautyYuYanli that would help reduce image size
FriendsOfFlarum upload, the intelligent file attachment extension
Can't upload more. DEBUG error:
GuzzleHttp\Exception\ClientException: Client error: `POST https://api.imgur.com/3/upload` resulted in a `429 Too Many Requests` response:
{"errors":[{"id":"","code":"429","status":"Too Many Requests","detail":"Too Many Requests"}]}
- Edited
robinodds you might have exceeded your Imgur quota https://api.imgur.com/errorhandling#429, https://apidocs.imgur.com/#rate-limits
clarkwinkelmann I got the same error even with a new imgur account
robinodds what kind of hosting are you using? I'm not familiar with Imgur API but reading the docs there seems to be a quota per IP as well. If you're on a shared hosting it could also be a different customer who also uses Imgur from the same IP.
Maybe you could try your API key from a different server or localhost to see if it's the IP that is restricted and not the API key.
- Edited
robinodds server problem
Tried switching to local and it worked. Switched back to imgur and it doesn't work.
php flarum cache:clear
and the backend cache clear - tried both doesn't work either.
beta 15 here and I can't update to beta 16 because there a still some essential extensions for us missing.
Any idea @clarkwinkelmann ?
Found that inside the logs:
[2021-05-08 14:04:24] flarum.ERROR: GuzzleHttp\Exception\ClientException: Client error: `POST https://api.imgur.com/3/upload` resulted $
{"errors":[{"id":"","code":"429","status":"Too Many Requests","detail":"Too Many Requests"}]}
in /var/www/xxxxxxx/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113
m4v3rick that error must be linked to Imgur. They must have restricted your API key or your IP. I don't think there's anything we can do at the extension level. If Imgur has a customer support for their API, you could try contacting them. Or you could ask your host to switch your IP or move to a different server manually.
- Edited
clarkwinkelmann
Thanks for your answer.
I think the same, but I don't really know why that happened. Making a new imgur account didn't help so it has to be the IP address for sure. I contacted the imgur support which told me I should post a question on stack overflow which I will do, because changing the IP address would mean to change quite a lot.
Is there compatibility with Google Cloud Storage? My intention is to send the uploaded images to a folder inside my bucket.
Darkle no, Google Cloud Storage is not an official adapter.
However if I remember correctly we should support most S3-compatible hosts via the Amazon S3 configuration, so maybe Google offers that as well?
clarkwinkelmann Oh I didn't know about that possibility, I'll do some research and see if it's possible with Google.
clarkwinkelmann that error must be linked to Imgur. They must have restricted your API key or your IP.
I tried to get the api client id credits. The response for the curl get I did was:
{
"data": {
"UserLimit": 2000,
"UserRemaining": 1999,
"UserReset": 1620774088,
"ClientLimit": 12500,
"ClientRemaining": 12499
},
"success": true,
"status": 200
}
It doesn't look like that the IP got restricted. Seems to be broken somehow. This is weird.
Puggo that setting is optional. If you don't know what it is, you probably shouldn't fill it.
It's an option in case your locally stored files are accessed through a different URL, either through a Pull/Proxy CDN or if the local folder is a remote folder mount for a Push CDN.
clarkwinkelmann i just want my files to save in some assets folder..
The plugin is support for aws s3,But AliOSS(China)too,when i try to set up AliOSS as my site resource upload,there is a problem about secret key error,i don't how is it happend,so i hope the developer cloud fix the problem,and thanks so much!