Note that there are some explanatory texts on larger screens.

plurals
  1. POUploadify to work with ASP.Net and not MVC
    primarykey
    data
    text
    <p>I am trying to work with Uploadify plugin and works fine in uploading and displaying files.</p> <p>As a known issue it doesn't supports sessions due to flash and the other fact is that we can work out by using MVC.</p> <p>But I dosen't know anything about MVC and trying to work with normal Asp.Net application and I have seen many articles regarding Uploadify mentioned below:</p> <p><a href="http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx" rel="nofollow">http://geekswithblogs.net/apopovsky/archive/2009/05/06/working-around-flash-cookie-bug-in-asp.net-mvc.aspx</a></p> <p><a href="http://techblog.edwardting.com/2011/05/20/multiple-file-upload-in-mvc-using-uploadify/" rel="nofollow">http://techblog.edwardting.com/2011/05/20/multiple-file-upload-in-mvc-using-uploadify/</a></p> <p>Now I need to get it work with Asp.Net application.</p> <p>I have created a Global aspx as said in the previous article and now Can anybody explain me in detail so that I need to create a session Id and save all the files in that Session Id and need to retrieve back with the Session Id in the OnComplete event. </p> <p>So here is my Script code :</p> <pre><code> &lt;script type="text/javascript"&gt; $(window).load( function () { $("#fileInput1").uploadify({ 'uploader': 'scripts/uploadify.swf', 'cancelImg': 'images/cancel.png', 'buttonText': 'Browse Files', 'script': 'UploadVB.ashx', 'folder': 'uploads', 'fileDesc': 'Image Files', 'fileExt': '*.jpg;*.jpeg;*.gif;*.png', 'queueSizeLimit': 9999, 'simUploadLimit': 2, 'sizeLimit': 4000000, 'multi': true, 'auto': true, 'onComplete': function (event, queueID, fileObj, response, data) { $("#thumbnail").append(response) }, 'onError': function (event, ID, fileObj, errorObj) { alert(errorObj.type + ' Error: ' + errorObj.info); } }); } ); &lt;/script&gt; </code></pre> <p>This is my Handler Code:</p> <pre><code> Dim savepath As String = "" Dim tempPath As String = "" tempPath = System.Configuration.ConfigurationManager.AppSettings("FolderPath") savepath = context.Server.MapPath(tempPath) Dim filename As String = postedFile.FileName If Not Directory.Exists(savepath) Then Directory.CreateDirectory(savepath) End If If Not Directory.Exists(savepath + "\thumbs") Then Directory.CreateDirectory(savepath + "\thumbs") End If postedFile.SaveAs((savepath &amp; "\") + filename) Dim fullImage As System.Drawing.Image = New System.Drawing.Bitmap((savepath &amp; "\") + filename) Dim newWidth As Integer = 100 Dim newHeight As Integer = 80 Dim temp As New Bitmap(newWidth, newHeight) Dim newImage As Graphics = Graphics.FromImage(temp) newImage.DrawImage(fullImage, 0, 0, newWidth, newHeight) temp.Save((savepath + "\thumbs" &amp; "\") + "t_" + filename) context.Response.Write("&lt;a href='" + (tempPath &amp; "/") + filename + "'&gt;&lt;img src='" + tempPath + "/thumbs" &amp; "/" + "t_" + filename + "'/&gt;&lt;/a&gt;") context.Response.StatusCode = 200 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload