Skip to content

A Meteor package to capture or upload an image, resize, crop and push to server widget on the client

Notifications You must be signed in to change notification settings

pfafman/meteor-photo-uploader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A Meteor package to capture or upload an image, resize, crop and push to server widget on the client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published