Skip to content

Latest commit

 

History

History
96 lines (61 loc) · 2.95 KB

README.md

File metadata and controls

96 lines (61 loc) · 2.95 KB

Meteor Photo Uploader

Depreciated !!! : See my new package photoUp

=======

NOTICE: THIS IS WAY OUT OF DATE AND DOES NOT WORK WITH THE CURRENT RELEASE OF METEOR.

See my new package.

Intro

This is a drop in widget to add the ability to upload, or capture, (if allowed by the device), images/photos. It will rescale the image, fix iOS sampling and orientation (using JavaScript-Load-Image which is included), allows cropping via Jcrop, which is also included with a few modifications.

Note: this is built using coffeescript.  If you don't want that then clone and compile it down to javascript.

TODO

Tests other than the test website Add more options

Installation

	[sudo] npm install -g meteorite

Note this is not on Atmosphere yet. You can add it if you want by editing your meteor upper level smart.json file with a "git" entry:

{
	"packages": {
    	"photo-uploader": {
        	"git": "https://github.com/pfafman/meteor-photo-uploader.git"
    	},
    	....
   	}
}

and then run meteorite to install.

	mrt add photo-uploader

If/when someone puts this on meteorite you can skip editing your smart.json file.

In your handlebar templates you can just include the template photoUploader:

    {{> photoUpload}}

Then in create a photoUpload object:

	myObject = new PhotoUploader( [options] )

##Options

serverUploadMethod:  	Name of your server side Meteor method for loading 
						the images to.  Default 'submitPhoto'.  The method 
						takes two arguments one for the image record and the
						second is an optional one to pass to the server method.
						
serverUploadOptions:    Object to pass to the server method.  Default {}

callback:				Callback for the server method callback(error, result)
						
uploadButtonLabel:		Label for the upload button.  Default 'Upload'

takePhotoButtonLabel:	Label for the take photo button.  Default 'Take Photo'

resizeMaxHeight:		Max Height of the image before loading to server. 
						Default: 300
		
resizeMaxWidth:			Max Width of the image before loading to server. 
						Default: 300
						
editTitle:              Add a title on upload.  Default: false

editCaption:            Add a caption on upload.  Default: false

Outside Packages