The third and most robust method for passing images to the builder is to use a source file which points to one or many collections file. Each collections file can point to one or many assets files. Examples for doing so with two collections files and two assets files are below.
<Source Id="default" Title="Personal Albums" IconUri="http://ezpservices.com/Assets/Artwork/Utility/SampleSource/Stock/6863945_00000_thumb.jpg">
<CollectionUri Format="xml" Id="1234">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/CollectionFile1PointingToAssetUri.xml</CollectionUri>
<CollectionUri Format="xml" Id="5678">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/CollectionFile2PointingToAssetUri.xml</CollectionUri>
</Source>
<Collection Id="1234" Title="Collection 1" Description="description attribute" Size="" IconUri="http://ezpservices.com/Assets/Artwork/Utility/SampleSource/Stock/6863945_00000_thumb.jpg">
<AssetsUri AssetCount="1" Id="1234" Format="xml">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/AssetsFile1With1Image.xml</AssetsUri>
<AssetsUri AssetCount="1" Id="1234" Format="xml">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/AssetsFile2With1Image.xml</AssetsUri>
</Collection>
<Collection Id="1234" Title="Collection 2" Description="description attribute" Size="" IconUri="http://ezpservices.com/Assets/Artwork/Utility/SampleSource/Stock/6863945_00000_thumb.jpg">
<AssetsUri AssetCount="1" Id="1234" Format="xml">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/AssetsFile3With1Image.xml</AssetsUri>
<AssetsUri AssetCount="2" Id="1234" Format="xml">http://apps.ezprints.com/skins/EZP/100287/services/documentation/files/AssetsFile4With2Images.xml</AssetsUri>
</Collection>
<Assets>
<Asset Id="1" Title="11x14 girl on beach.jpg" Description="" Size="" PrintResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/full/6863944_00000_thumb.jpg" PrintResWidth="3360" PrintResHeight="2640" ScreenResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/preview/6863944_00000_preview.jpg" IconUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/6863944_00000_thumb.jpg" />
</Assets>
<Assets>
<Asset Id="2" Title="12x12 Bassett.jpg" Description="" Size="" PrintResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/full/6863945_00000_thumb.jpg" PrintResWidth="2880" PrintResHeight="2880" ScreenResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/preview/6863945_00000_preview.jpg" IconUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/6863945_00000_thumb.jpg" />
</Assets>
<Assets>
<Asset Id="3" Title="16x20 ATL skyline red.jpg" Description="" Size="" PrintResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/full/6863946_00000_thumb.jpg" PrintResWidth="4800" PrintResHeight="3840" ScreenResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/preview/6863946_00000_preview.jpg" IconUri="apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/6863946_00000_thumb.jpg" />
</Assets>
<Assets>
<Asset Id="4" Title="20x20 lakeview.jpg" Description="" Size="" PrintResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/full/6863947_00000_thumb.jpg" PrintResWidth="4800" PrintResHeight="4800" ScreenResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/preview/6863947_00000_preview.jpg" IconUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/6863947_00000_thumb.jpg" />
<Asset Id="5" Title="20x30 yellow flower.jpg" Description="" Size="" PrintResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/full/6863949_00000_thumb.jpg" PrintResWidth="7200" PrintResHeight="4816" ScreenResUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/preview/6863949_00000_preview.jpg" IconUri="http://apps.ezprints.com/Assets/Artwork/Utility/SampleSource/Stock/6863949_00000_thumb.jpg" />
</Assets>
Additionally, there are pre-existing sources with additional features you may implement.- EZPservices upload - This source will enable users to upload images in the builder. All images are stored on EZPrints servers. To enable this, add the string "ezpservices" to your mediaPickerSources object like so:
,mediaPickerSources: [ ...,"ezpservices",... ]
Note: We currently only support JPG and PNG formats without transparency. PNG transparency will be converted to a solid color upon upload.
- Sideload Sources - These sources will enable users to get images from a number of popular image storage sites. We currently support SmugMug, Picasa, Flickr, and Facebook. To enable sideload do the following:
- Edit the mediaPickerSources parameter in the function call to ezp.apps.createTemplateApp to include selected sources e.g.
,mediaPickerSources: [ ...,"smugmug","picasa","flickr","facebook",... ]
- Save this file to your hosted website - http://apps.ezprints.com/service/2.0/ezpbuildercallback.html
- In the EZP Services management tools go to Account Settings -> Builder Configuration -> Advanced Options and set Sideload Media Return URL to the url of your hosted page i.e. http://mydomain.com/ezpBuilderCallback.html
Once updated, you will be enabled to use selected media from sources such as Facebook, Flickr, Smugmug, and Picasa in your builder products.