Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shahriyardx/express-cloudinary

simple repo with a express app that can be used to upload and delete filed on cloudinary
https://github.com/shahriyardx/express-cloudinary

Last synced: 9 days ago
JSON representation

simple repo with a express app that can be used to upload and delete filed on cloudinary

Awesome Lists containing this project

README

        

# express-cloudinary
simple repo with a express app that can be used to upload and delete filed on cloudinary

## Example upload
```js
const data = new FormData()
data.append('file', file)

fetch('http://localhost:5001/upload', {
method: "POST",
headers: {
'content-type': 'multipart/form-data',
},
body: data,
})

// { success: true, url: , public_id: }
```

## Example delete
```js
fetch('http://localhost:5001/delete', {
method: "DELETE",
headers: {
'content-type': 'application/json',
},
body: JSON.stringify({ public_id: 'file_public_id' })
})
```