tractor-beam

Directory upload using proposed Directory Upload spec as part of the new FileSystem API.

Usage no npm install needed!

<script type="module">
  import tractorBeam from 'https://cdn.skypack.dev/tractor-beam';
</script>

README

tractor-beam

npm build dependencies downloads license chat

Future-proof file upload

Directory upload using proposed Directory Upload spec as part of the new FileSystem API.

Overview

User should be able to drag and drop a folder and upload site which will be statically hosted by us. We will leverage the new Directory Upload proposal (part of the new FileSystem API) which is currently only supported in Firefox Nightly / Edge. Chrome 25+ can be supported with a polyfill.

Spec: https://wicg.github.io/directory-upload/proposal.html / http://w3c.github.io/filesystem-api/ Example: https://wicg.github.io/directory-upload/index.html

Flow

Create TractorBeam instance with options Options should include a parameter called postPath. postPath should either be a function that takes a file returns a string or a simply string

Install

$ npm install tractor-beam --save

License

BSD