# /image/upload

## Cloudinary image upload.

<mark style="color:green;">`POST`</mark> `geolytix.xyz/api/location/edit/images/upload`

This endpoint allows to upload an image blob to the Cloudinary image hosting service.\
\
An image must be provided as a data blob in the post body.

#### Query Parameters

| Name  | Type   | Description                                             |
| ----- | ------ | ------------------------------------------------------- |
| dbs   | string | The database connection for the location table.         |
| table | string | The location table.                                     |
| field | string | The array field which stores image URL.                 |
| qID   | string | The id field for the location table.                    |
| id    | string | The id of the location.                                 |
| token | string | A signed token is required to access private endpoints. |

{% tabs %}
{% tab title="200 Image successfully uploaded." %}

```javascript
{
"image_id":"open/oaeo6wykd7e6ytfj1b2e",
"image_url":"https://res.cloudinary.com/geolytix/image/upload/v1541290143/open/oaeo6wykd7e6ytfj1b2e.jpg"
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
In order for an image to be stored on the Cloudinary image hosting platform the image key with a valid Cloudinary connection string must be provided in the environment settings.
{% endhint %}
