Troca o arquivo de uma imagem da galeria
PUT/api/upload/gallery/images/{imageId}
- Auth
- Token erforderlich
- X-CommunityId
X-CommunityIdSende die X-CommunityId der Community, in der die Operation stattfindet.
Die Beschreibungen der Endpoints stammen aus der API-Spezifikation und sind vorerst auf Portugiesisch. Die Oberfläche drumherum ist übersetzt.
Multipart, campo `image` (JPEG, PNG, WebP ou GIF, até 20 MB). Mantém o id, o título e as tags; gera imagem e miniatura novas (URLs novas) e **apaga os arquivos antigos**. Mesmos papéis de quem edita a imagem: owner, admin, moderador ou o autor da imagem (403 para os demais; 404 se a imagem não é da comunidade do `X-CommunityId`). Como toda edição, devolve a imagem à moderação do space.
Parameter
| Name | Ort | Typ | Beschreibung |
|---|---|---|---|
imageIdPflicht | path | string (uuid) |
Header
| Name | Typ | Beschreibung |
|---|---|---|
X-CommunityIdoptional | string (uuid) | ID da comunidade em que a operação acontece. Obrigatório na maioria dos endpoints com escopo de comunidade. |
Request-Body multipart/form-data
| Name | Typ | Beschreibung |
|---|---|---|
imagePflicht | string (binary) |
Antworten
| Status | Beschreibung |
|---|---|
200 | Arquivo trocado; devolve `id`, `imageUrl`, `thumbnailUrl`, `moderationStatus`. |
400 | Requisição inválida — falha de validação. |
401 | Token ausente, inválido ou expirado. |
403 | Autenticado, mas sem permissão para esta operação. |
404 | Recurso não encontrado. |
500 | Erro interno do servidor. |
curl-Beispiel
curl -X PUT "https://api.memberfy.net/api/upload/gallery/images/<imageId>" \
-H "Authorization: Bearer $TOKEN" \
-H "X-CommunityId: $COMMUNITY_ID" \
-F "file=@caminho/do/arquivo"