I’m trying to upload an avatar image with the API as follows. I’m getting back a 500 error and I don’t see anything in the Error Logs on the server, via the Admin user.
I’ve attached a picture with the data from a Postman POST.
Of note is that I had this working at one time but then something changed and it stopped working. I’m not sure what changed, besides an update to Discourse and Docker.
How would I find the changelog around the upload API? This worked before I did an update of Discourse. The update was large, as it was about a year old.
Previously I did it this way:
POST to {base_url}/users/{username}/preferences/user_image?api_key={key}&api_username={username}
followed by
POST to {base_url}/users/{username}/preferences/avatar/pick?upload_id={id}api_key={key}&api_username={username}
The upload_id was returned by the first POST. This flow is not working anymore. Does anybody know what might have changed? Or how I can get it working again?
There is supposed to be a synchronous option with uploads API as well and I can’t get that to work either. The synchronous option was supposed to return the upload_id. At least that is what I gathered from other posts here.
I got that to work with a non-staff member. Not sure what I was doing wrong, but I had tried basically the same thing several times to no avail. One thing that I did different was I had some headers defined for “Accept” and “Content-Type”
Me preguntaba si es posible que una aplicación envíe un token de autenticación de Discord a Discourse para subir o descargar un archivo desde Discourse.
Es decir, actualmente los usuarios pueden subir por defecto hasta 4096 KB para imágenes de avatar. Ya tengo configurado y funcionando el OAuth de Discord. ¿Puede una aplicación comunicarse y enviar la misma solicitud (quizás mediante SSO) a Discourse para subir o descargar un archivo?
De ser así, ¿cómo funcionaría esa solicitud desde la aplicación?