Main Socket features:
- zip/archive — create zip archive
Install package in your project:
cd my_project
npm install @syncano/cli --save-dev
npm install @eyedea-sockets/zip --save
npx s deploy
Use it:
import Syncano from '@syncano/client'
const s = new Syncano(<instaneName>)
// FormData with the file
const form = new FormData()
form.append('file', fs.createReadStream(fileLocalPath))
form.append('filename', 'archive')
const sendStatus = await s.post('zip/archive', form)
Parameter | Type | Required | Example |
---|---|---|---|
filename | string | Yes | archive |
file | file | Yes |
success - Operation Successful
- Code: 200
- Mimetype: application/zip
Zip file.
fail - Operation failed
- Code: 400
- Mimetype: application/json
Parameter | Type | Description | Example |
---|---|---|---|
message | string | Invitation failed | Internal error. |