Api::V1::Neighborhoods::ChatMessagesController API

Chat messages

Presigned upload

POST /api/v1/neighborhoods/:neighborhood_id/chat_messages/presigned_upload

Parameters

Name Description
neighborhood_id neighborhood
token token
content_type image/jpeg, image/png

Request

Headers

Content-Type: application/json
Host: example.org
Cookie: 

Route

POST /api/v1/neighborhoods/6/chat_messages/presigned_upload

Body

{"token":"foobar95","content_type":"image/jpeg"}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET,POST,PUT,PATCH,DELETE
Access-Control-Allow-Headers: Origin,Accept,Content-Type,X-Requested-With,X-CSRF-Token,X-API-KEY
Content-Type: application/json; charset=utf-8
ETag: W/"2229158a8cd82c59facad5f481c130c7"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: fa46427b-2ca5-4e85-8edb-f2aa067cc58c
X-Runtime: 0.007555
Content-Length: 485

Status

200 OK

Body

{
  "upload_key": "3383b1ed-feb1-41c5-b24a-319a943ce020.jpeg",
  "presigned_url": "https://foobar.s3.eu-west-1.amazonaws.com/chat_messages/3383b1ed-feb1-41c5-b24a-319a943ce020.jpeg?x-amz-acl=private&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=foo%2F20220602%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20220602T151644Z&X-Amz-Expires=60&X-Amz-SignedHeaders=content-type%3Bhost&X-Amz-Signature=e80742ec6c20235a646815cbf95e068c2f94a736557dfa03152cdac607b344a5"
}