Telerik Product and Version
|
UI for ASP.NET AJAX Q2 2014
|
Supported Browsers and Platforms
|
|
Components/Widgets used (JS frameworks, etc.)
|
.NET 3.5/4.0/4.5
|
PROJECT DESCRIPTION
In cases when RadAsyncUpload is used for uploading images it can often be useful to be able to preview the images before you actually upload them.
Such behavior can be achieved either in browsers that support FileApi by drawing image with canvas or in the older browsers(IE7,8,9) by implementing a scenario similar to the one described in this
help topic.
** UPDATE from 03 April 2018 **
Implementing the workaround from the
Access selected file in the arguments of OnClientFileSelected event of AsyncUpload KB article would allow direct access to the file via the .get_file() method of the arguments of the OnClientFileSelected event handler. That would allow a simpler code and solve a bug with a preview of multiple images after the previous images are uploaded. For example, the else statement in the OnClientFileSelected handler can be as follows:
** End of UPDATE **
In the attached sample page these two methods are combined in one solution using RadAsyncUpload.
P.S. In the current version of FireFox (31) there is some
bug with the drawImage() method which is throwing an error but I hope they will fix it soon.
Meanwhile we can alert that the issue is currently not supported by the browser.