When a user is creating a record in Salesforce, for example, a case that reports a problem with a piece of equipment, it can be useful to attach an image as proof of the problem or to make it clear exactly where the issue is.
In this recipe, we will create a Visualforce page that allows a user to raise a case and include an image as proof that there is a problem. The Visualforce page will be made available to the Salesforce1 application as a custom action on the account record home page.
This recipe requires that you have already uploaded the Salesforce Lightning Design System version 2.0.2 as detailed in Chapter 8, Force.com Sites.
This recipe also makes use of the Mega Pixel image rendering library created by Shinichi Tomita. Download megapix-image.js
from https://github.com/stomita/ios-imagefile-megapixel/tree/master/src.
Carry out the following steps to upload the library as a static resource.
Navigate to the Static Resource setup page by...