Announcing the NEW Shubox JS Library
The Shubox mission from the beginning was simple - make it easier to get any old arbitrary file from your computer or mobile phone to the biggest cloud storage player in the world, Amazon S3, without having to hook up all this boilerplate, and with flexibility and flair in the user experience.
I won’t belabor any further with the “why’s” and “how’s” things needed to change because of course there are plenty. Instead let’s talk about the great things that come with the new library as a way to illustrate how this shift will benefit not only Shubox but YOU, the every day developer.
- It is now a package on NPM. That’s right, Shubox is finally joining the JS revolution and is distributed through the NPM package registry. Until now the philosophy had been to make Shubox a standalone script file, unique to your project/domain (per the note above) - just include it in your HTML and you’re off to the races. The downside to this is that approach is analogous to purchasing a horse and buggy in the age of cars. Single page applications, react, vue, angular, et al, don’t work that way. So, it was beyond the time to get with the program.
There are many new features. Let’s talk about some of the new ones:
- Transform completion callback. When your processed images are created, or new file formats are generated, you can watch for existence of those files and fire a callback function to do whatever you’d like.
- Support for a CDN instead of amazon’s bucket URL. Resulting files can now
be referenced via your chosen CDN hostname -
- All provided options are now passed along to Dropzone.js. Previously there were only a subset of options moved along to the Dropzone instances.
- You can now specify the exact S3 object key for (an) uploaded file(s). Very useful when you know exactly where a Shubox dropzone should end up, named specifically to your liking.
- And more … the options, new and old, are all available to check out at GitHub.
- It is open source! That’s right. The Shubox TS code is all available and open at our GitHub repo. As is this blog, mind you. Let us know over there if there are any issues, comments, feature requests.
- There is more documentation – a LOT more documentation. With the guts of everything on GitHub the barrier to shipping new docs with the features is virtually nonexistent.
Suffice it to say, it’s been a journey getting this new library whipped into shape to the point where things felt good getting out there. All of the demos at Codepen have been updated to use the new library – some with the new features I outline above – so we invite you to kick the tires over there. Or check out the code at GitHub and to let us know what you think at our twitter account, or email us directly at email@example.com. We’re all ears!