@eyedea-sockets/zip

Syncano Socket for creating ZIP archive

Usage no npm install needed!

<script type="module">
  import eyedeaSocketsZip from 'https://cdn.skypack.dev/@eyedea-sockets/zip';
</script>

README

Syncano Socket for creating ZIP archive

Syncano Socket CircleCI branch Codecov branch npm license

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.