Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
steevepay committed Sep 10, 2024
1 parent d40fd3d commit c36455c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion USAGE-S3.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,11 @@ Bulk delete files (Maximum 1000 keys per requests)

```js
/**
* Create a list of objects, it can be:
* Provide a list of filenames as second argument, it can be:
* - a list of string ["object1.pdf", "object2.docx", "object3.pptx"]
* - a list of object with `keys` as attribute name [{ "keys": "object1.pdf"}, { "keys": "object2.docx" }, { "keys": "object3.pptx" }]
* - Or a list of objects with `name` as attribute for the filename: [{ "name" : "file1.png" }, { "name": "file2.docx" }]
* - Or a list of objects with a custom Key for filenames, you must define `fileNameKey` as option (third argument).
*/
const files = ["object1.pdf", "object2.docx", "object3.pptx"];

Expand Down
7 changes: 7 additions & 0 deletions USAGE-SWIFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,13 @@ storage.setFileMetadata('templates', 'filename.jpg', { headers: { 'Content-Type'
Bulk delete files (Maximum 10 000 objects per requests).
```js
/**
* Provide a list of filenames as second argument, it can be:
* - a list of string ["object1.pdf", "object2.docx", "object3.pptx"]
* - a list of object with `keys` as attribute name [{ "keys": "object1.pdf"}, { "keys": "object2.docx" }, { "keys": "object3.pptx" }]
* - Or a list of objects with `name` as attribute for the filename: [{ "name" : "file1.png" }, { "name": "file2.docx" }]
* - Or a list of objects with a custom Key for filenames, you must define `fileNameKey` as option (third argument).
*/
const filesToDelete = [ { name: '1685696359848.jpg' }, { name: 'template-column.docx' }, { name: 'test file |1234.odt' } ]
swift.deleteFiles('', filesToDelete, function(err, resp) {
Expand Down

0 comments on commit c36455c

Please sign in to comment.