You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nairdo edited this page Nov 17, 2011
·
5 revisions
There are two ways to fetch (reference) files and images from BLOB storage, using File.ashx or Image.ashx passing either the ID or GUID as shown in this example:
File.ashx?735A97A3-7A9A-4D3F-BE86-B3874E85E141
or
Image.asxh?3
The final reference might look like this <img src="Image.ashx?3" alt='logo'>
Using the File.ashx handler to fetch large files is fast and efficient because the file is streamed from the storage asynchronously and is not loaded into memory to do so.
Using the Image.ashx handler gives you some additional features such as resizing, rotating, and caching (such transformations). To rotate an image simply pass rotate with the number of degrees. To resize an image, simply pass height and width parameters or maxheight and maxwidth. Using the later will maintain the aspect ratio while using the former will force the image into the provided dimensions.