Flash 8 FileReferenceList - upload script for .NET

Posted Saturday, August 20, 2005 2:17 PM by Shunjie
The below is the codes to save the files uploaded from Flash 8's FileReferenceList, using asp.net 1.1

/*C# .NET */
        string saveToFolder = "savedFiles"
        private void Page_Load(object sender, System.EventArgs e)
        {
          
            HttpFileCollection uploadedFiles =  Request.Files;
            string Path = Server.MapPath(saveToFolder);
            for(int i = 0 ; i < uploadedFiles.Count ; i++)
            {
                HttpPostedFile F = uploadedFiles[i];
               
                if(uploadedFiles[i] != null && F.ContentLength > 0)
                {   
                    string newName = F.FileName.Substring(F.FileName.LastIndexOf("\\") + 1);
                    F.SaveAs(Path + "/" + newName);
                }
            }
        }


Its actually very simple as it is just a normal uploading of files.
Filed under: ,

Comments

# Flash 8 File Upload Download

Wednesday, August 24, 2005 3:49 AM by Oinam Blog

We have completed an example of one of the new feature in Flash Player 8, the File Upload/Download - FileReference. The current demo have a parameter to control the MAX size of the individual files that can be uploaded. This value is changeable via the FlashObject variables in the SWF embedded html. The current demo is also configured to save the uploaded files to a directory, &amp;#8220;userUploads&amp;#8221;. Sypnosis Flash Developers have been asking for File Upload download functionality in flash for a long time now. This time round, Macromedia finally decided to put in this functionality in the Flash 8 Player. And the better news is that the API that has been provided allows for uploading not just one but multiple files as well. This example shows how multiple files can be uploaded to the server using a simple upload queue. The upload queue groups together multiple upload requests and provides unified progress events for the entire group. This helps us provide the user with a single progress display even when uploading multiple files. The possibilities this opens up for flash RIA&amp;#8217;s is amazing. Imagine populating an entire photo gallery with a Select All + Upload combo. Flash developers now...

# Flash 8 File Upload Download

Thursday, August 25, 2005 5:22 AM by Oinam Software

We have completed an example of one of the new feature in Flash Player 8, the File Upload/Download - FileReference. The current demo have a parameter to control the MAX size of the individual files that can be uploaded. This value is changeable via the FlashObject variables in the SWF embedded html. The current demo is also configured to save the uploaded files to a directory, &amp;#8220;userUploads&amp;#8221;....

# re: Flash 8 FileReferenceList - upload script for .NET

Wednesday, March 29, 2006 6:21 PM by edanesh

good work, but for me, the C# code doen't work.