Organization logo uploaded through the API is saved as a temporary file path
Hi team,
First, thank you for the API — the Agency endpoints have made onboarding our customers genuinely pleasant, and we use them every day.
I think we have found a small bug in PUT /api/v1/organizations/{id}.
When a logo is uploaded through that endpoint, the request succeeds and the organization is updated, but the stored logo path is the PHP temporary upload name instead of the saved file. The image then 404s everywhere it is shown.
What we send:
POST /api/v1/organizations/{id}
_method=PUT
name=...
logo=@logo.png (PNG, 20 KB, 192x192)
-> 200 OK
What is stored afterwards:
https://cdn.revw.me//tmp/phpnn7FR1 -> 404
(note the double slash and the /tmp/php... name)
What we expected is a stored media URL, like the one the interface produces when the very same file is uploaded by hand:
https://cdn.revw.me/<org-uuid>/profile-photos/<name>.png -> 200
A few details that may help:
Reproduced with two different PNG files (20 KB and 27 KB), both well under the documented 250 KB limit.
Uploading the same file through the web interface works perfectly, so it looks like only the API path is missing the step that moves the uploaded file into storage.
A real PUT with multipart/form-data is not parsed at all (it answers "The name field is required"), so POST + _method=PUT appears to be the only way to send a file — and that is the path showing the issue.
There is no remove_logo field, so once a broken logo has been set, it can only be cleared from the interface.
Thank you very much for looking into it, and thanks again for the work you put into the platform.
Log in to comment and vote
No comments yet
Be the first to share your thoughts.