@eyedea-sockets/zip
v0.0.3
Published
Syncano Socket for creating ZIP archive
Downloads
10
Readme
Syncano Socket for creating ZIP archive
Main Socket features:
- zip/generate — generate zip file from HTML
Getting Started
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)
Endpoints
zip/archive
Input:
|Parameter | Type | Required | Example |
|--------------|------|-----------|------------------|
|filename |string| Yes | archive
|
|file |file | Yes | |
Outputs:
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.
|