byennen / one

0 stars 1 forks source link

FileTools, buckets, and AWS inconsistencies. Naming conventions... #43

Open ai10 opened 9 years ago

ai10 commented 9 years ago

The filetools sign and upload process is kinda bent out of shape and awkward.

e.g. the 'chuck_lambda' branch is effective for using AWS to resize uploads to a thumbnail; but I think it tramples on gallery code. So I want to refactor that chain.

Also: some teams raise issues and then name branches after the issue numbers. ?

afruth commented 9 years ago

It's true, the gallery uses the old way of uploading pictures. If you want and you show me how you did it for profile pictures i can refactor it. Or you can do it if you'd like. At this point uploaded pictures are only one size, but it would be great if they had 2 sizes: a full size for full screen and a thumbnail for list view.

Just let me know how you want it done.

ai10 commented 9 years ago

I'm intend to continue - but for one I've created a 'bucket list' in a devset.json --settings file; rather than presume we are going to be using one bucket; and code the appropriate url for them. Lambda is currently only available in us-west-2 ; which happens to have different format from urls than us-standard.

ccorcos commented 9 years ago

Not sure how you feel about this, but I wrote a small package that resizes images on the client using an HTML5 canvas. It works pretty great actually.

https://github.com/ccorcos/meteor-clientside-image-manipulation

It seems odd to me that the status quo is uploading full res images and then shrinking them...

ai10 commented 9 years ago

your logic is infallible; about 10 months ago I was using this example for video: IS.ctx.drawImage IS.video, 0, 0, 280, 120 b64 = IS.canvas.toDataURL() IS.snap.image b64

ccorcos commented 9 years ago

Whoa. I hadn't even thought of doing this for video!! You're more than welcome to contribute to my package :+1:

One of the main motivations for this package was just rotating images that have EXIF orientation tags because they aren't well supported across the web. The resolution downsizing pretty much came for free :)