How to upload images/photos efficently?

Is there an easy way to upload images/photos from camera/file and compress them before uploading. New phones create big images that will quickly use up available space and require long transfer time. The JIC project GitHub - brunobar79/J-I-C: J I C is a Javascript Image Compressor using HTML5 Canvas & File API that allows you to compress your jpeg & png images before uploading to the server (100% client-side and no extra libraries required!) seems to adress this, demo Is it possible to combine with the file upload component in SKUID in an easy way. Either by specifying fixed value for ratio or by adjusting that as a property on the component.

Hi Peter, I actually did this for a project I was working on. I used jCrop to let the user crop their photo, and then I forced the image down to a certain size using a html canvas element in a similar fashion to JIC. I had to write my own javascript remoting method in a custom controller extension to do the actual upload though. We really want to add this functionality to the image upload component, but haven’t gotten the time to do this yet. I would have to play with JIC a bit to see if it would work to use Skuid’s upload functionality. Unfortunately, I’m not sure when I’ll get a chance to look at that. This would be huge though if the image/file component came with something like this out of the box.

Hi Guys.  

I was looking for info on camera usage within Skuid mobile and I discovered this post.  

Do you know of any Javascript I can use in Skuid mobile to invoke the camera and save the image to a field or Google Drive link?

In SF1 you can upload a picture to SF files and include a WhoId but not a WhatId and the architecture to us is just not right.

Any help will be much appreciated.


We have been able to upload images from devices to the Salesforce Attachment object.  If you are in the mobile builder and you use a “field” component on the reference to Attachment, you can use the “file upload” renderer.  On a mobile device you will be asked whether you want to upload somthing from your library,  or use your camera to take a new piclture. 

Then you can use the “image” component to display the uploaded file within your pages. 

The attachment object carries a parent object that ties it pretty effectively to the object you are trying to relate it too. 

I’ve noted that we need to better document this feature in our Mobile tutorials. 

Hi Rob.

Thanks for this.  Can you check this for me please?

I have my main model.
I am using a look up to file for the image attachment.
I have a second model pointing to the Attachment Object and filtered to the record Id of the main.

Which field from the Attachment Object do I assign to the Field Component of the Deck pointing to the Attachment Object?

I have tried all and none give me the option to select “file upload” renderer.

Thanks G.

Hi Gregg,

If you just want to upload the image (an not necessarily show it) you don’t need a second model at all.  Once you’ve created your lookup to the Skuid File Object, you should just be able to add that lookup relationship as a Field Component.  On that field, you should have the option of the “File Upload” renderer.

Thanks Ben.  

That works.  My problem here is I am using a Samsung Galaxy Note 3 and it reacts by creating a blank popup.  On the Galaxy Tab 10 '2014 it invokes a popup with the options to upload or remove the current file but does not invoke the camera option.  I am going to test on the new iPhone and will update this slot with the results.