@cd2/fileboy-browser
v1.1.0
Published
The official drop-in script for [Fileboy](https://fileboy.io): file uploads for any web page, with no build step.
Readme
Fileboy browser script
The official drop-in script for Fileboy: file uploads for any web page, with no build step.
For video, use @cd2/fileboy-player. Version 1.0.0 removed the video player (data-fileboy-video, fb.reloadVideoPlayers() and fb.loadPlayer()); 0.15.x still has it.
Find the docs at https://fileboy.io/docs/libraries/javascript
<script>FILEBOY_PUBLIC_KEY = "YOUR_PUBLIC_KEY"</script>
<script src="https://unpkg.com/@cd2/[email protected]"></script>
<input type="hidden" data-fileboy name="avatar" />Upload into a folder with folderPath or folderId in data-fileboy. The folder must already
exist (create it from your server with your private key), and a path given here cannot contain
spaces, so use folderId for folder names with spaces:
<input type="hidden" data-fileboy="folderPath=/uploads/avatars allow=image/*" name="avatar" />Publishing (maintainers)
You need an npm account in the @cd2 organisation with publish rights (npm login, 2FA code required). The package is public. The script served at https://unpkg.com/@cd2/fileboy-browser is the published dist/fileboy.js, so publishing changes what every site using it loads: test dummy.html first.
- Publish
@cd2/fileboy-reactfirst if this release needs a newer version of it, and update the dependency range here. - Bump
versioninpackage.json. yarn build(bundles with esbuild intodist/fileboy.js) and opendummy.htmlto check it works.npm pack --dry-runmust listdist/fileboy.js.npm publish --access public.- Tag it:
git tag browser-vX.Y.Z && git push origin browser-vX.Y.Z.
Versions cannot be republished. unpkg caches the latest tag for a few minutes.
