snip
Of course, I set the parameters correctly with a freshly generated API from a new account.
I finished uploading every possible image to talkimg, only a few left above the 2MB threshold, so I wanted to have a second round with imgbb.
Apparently still the uploading error I had the other day
[Error] Origin https://bitcointalk.org is not allowed by Access-Control-Allow-Origin. Status code: 502
Error 502 means that there's an error from the server side. When I digged up I found that we get this error when appropriate CORS (Cross-Origin Resource Sharing) headers are not set on the domain.
So the API request in the above script is being blocked by the browser and there are only two solutions for this.
1. The server side configuration has the appropriate CORS headers set and allows requests from bitcointalk
2. Get a proxy or server side endpoint which allows us to bypass CORS restrictions
So I guess it won't be possible on imgbb since we don't have anyone from server side to allow the above configuration.
May be joker_josue can help in here to increase the max limit size for the uploads or provide specific endpoint which allow increased max limit size to specific users.