New Socialize Package Release: socialize:cloudinary


#1

Just wanted let everyone know about the newest package in the Socialize set, socialize:cloudinary, which I have just published to Atmosphere. While there are many cloudinary packages on Atmosphere, each one of them have issues that make them less desirable.

The things that make socialize:cloudinary better:

  • Written using ES modules
  • Uses best practices such as not explicitly depending on npm packages through Npm.depends()
  • Fully up to date with the latest cloudinary releases
  • Standardized Cloudinary API across server and client
  • No dependence on extraneous packages
  • Fully promisified API allowing use of async/await (This is the best feature)
import { Cloudinary } from 'socialize:cloudinary';

class Uploader extends Component {
    onChange = (e) => {
		const uploads = Cloudinary.uploadFiles(e.currentTarget.files);
		uploads.forEach(async (response) => {
		    const photoData = await response;
		    console.log(photoData); //do something with the response data here
		});
    }
    render() {
        return (
        	<input type="file" accept="image/*" multiple onChange={this.onChange} />
        );
    }
}

Hope you guys find this useful :smile:


#2

I wish this existed 3 years back ! :smiley: Nice one though.

by the way, can it upload pdfs to cloudinary @copleykj ? As far as I know, cloudinary supports that.


#3

Me Too, and Thanks! Yes, you can upload just about any file to cloudinary… You’d just want to use the Cloudinary.downloadURL method to get a url to insert in your html instead of the the Cloudinary.url, which is meant for manipulating images for display.

If I can stave off the need to take on extra contract work, this will be just the beginning of the packages that I’ll be releasing. I’m also making decent progress now on a full social network demo for the packages. https://github.com/copleykj/meteor-socialize-demo


#4

Love the socialize packages. Looking to use on my next social app project.