ssb-blob-files
github.com/ssbc/ssb-blob-files
Take files from DOM events, and blobify them.
This is a refactoring of the patchcore blob.html.input attachment mess
New features:
- supports mutliple file uploads
- doesn't add blobs > 5MB to your blob store !
var blobFiles = require('ssb-blob-files')
var fileInput = h('input', {
type: 'file',
attributes: { multiple: true }, // permit multiple files to be attached
'ev-change': (ev) => {
var files = ev.target.files
blobFiles(files, server, { stripExif: true, isPrivate: true }, perFileCallback)
})
})
I intend to use this for all sorts of input including :
- drag-n-drop attachments !
- attach a gathering image and preview it immediately
JS client maintainers ahoy!
I would like this module to be one that's easy to use, maintain, and extend.
I'd love to work with y'all and for us to use this shared module Are you on board?
cc @matt @dominic @Tim Schumacher @cryptix
I've added this to Patchbay in places of blob.html.input
already, and later I'll open a PR for patchcore