Ajax Uploader Evaluation ~ Demo Problems

Last post 03-30-2008, 9:06 PM by arlan. 4 replies.
Sort Posts: Previous Next
  •  03-27-2008, 3:05 PM 38406

    Ajax Uploader Evaluation ~ Demo Problems

    Hello,
     
    I am reviewing Ajax Uploader that I downloaded yesterday and I cannot get the demos to work correctly.
    I am using .NET 1.1 on Windows Server 2003. The demos run correctly and they report that everything worked correctly but there is no file in the UploaderTemp folder.
     
    However, I noticed that when I use the "multiple-files-upload.aspx" or "Simulate-File-Upload.aspx" examples, the files are created but they seem to be more temp files since they have a name such as "persisted.4c691391-8172-43ba-8021-94bc6217d581.TestUpload.csv.resx" where "TestUpload.csv" was the file I was uploading. If I rename that file back to "TestUpload.csv" it looks and works correctly. The other examples create no files at all in the UploaderTemp folder.
     
    I would like to use the Ajax Uploader componet for a new project. I used Cute Live Support for another project over a year ago and it was a great success.
     
    Arlan
    Filed under:
  •  03-28-2008, 2:06 AM 38412 in reply to 38406

    Re: Ajax Uploader Evaluation ~ Demo Problems

    Arlan,
     
    >>I used Cute Live Support for another project over a year ago and it was a great success.
     
    Thanks for the nice comments about cute live support.
     
     
    >>However, I noticed that when I use the "multiple-files-upload.aspx" or "Simulate-File-Upload.aspx" examples, the files are created but they seem to be more temp files since they have a name such as "persisted.4c691391-8172-43ba-8021-94bc6217d581.TestUpload.csv.resx" where "TestUpload.csv" was the file I was uploading. If I rename that file back to "TestUpload.csv" it looks and works correctly. The other examples create no files at all in the UploaderTemp folder.
     
    Please use the following method to save the uploaded file:
     


        void Uploader_FileUploaded(object sender, UploaderEventArgs args)
        {
            Uploader uploader = (Uploader)sender;
            InsertMsg("File uploaded! " + args.FileName + ", " + args.FileSize + " bytes.");

            //Copys the uploaded file to a new location.
            //args.CopyTo(path);
            //Opens the uploaded file's data stream.
            //System.IO.Stream data = args.OpenStream();
        }

    Hope it helps.
     
    Keep me posted
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-28-2008, 9:27 AM 38441 in reply to 38412

    Re: Ajax Uploader Evaluation ~ Demo Problems

    HI Adam,
     
    I am using VB.NET in VS2003 (v7.1.3088) with .NET Framework 1.1.4322(SP1).
     
    I made the following changes to the file called simple-upload.aspx as you suggestered:
     
    Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)
       Dim uploader As Uploader = DirectCast(sender, Uploader)
       InsertMsg("File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.")
       'Copys the uploaded file to a new location.
       args.CopyTo("C:\Data\Dev\")
       'Opens the uploaded file's data stream.
       System.IO.Stream data = args.OpenStream()
    End Sub 
     
    I received the following error mesage:
     
    Compiler Error Message: BC30691: 'Stream' is a type in 'IO' and cannot be used as an expression.

    Source Error:
    Line 37:             args.CopyTo("C:\Data\Dev\")
                Line 38:             'Opens the uploaded file's data stream.
                Line 39:             System.IO.Stream data = args.OpenStream()
                Line 40: 		End Sub
                Line 41: 		</script>

    I made the following changes instead:
     
    Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)
       Dim uploader As Uploader = DirectCast(sender, Uploader)
       Dim data as System.IO.Stream
     
       InsertMsg("File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.")
       'Copys the uploaded file to a new location.
       args.CopyTo("C:\Data\Dev\")
       'Opens the uploaded file's data stream.
       data = args.OpenStream()
    End Sub 

    I received the following error mesage:
     
     
    Exception Details: System.IO.IOException: The process cannot access the file "C:\Data\Dev\CuteSoft\UploaderTemp\uploading.a7a36c32-afe4-43bc-8b1b-0df7a6c1edc6.Test.txt.resx" because it is being used by another process.
     
    Do you have any other suggestions that I can try to resolve this issue.
     
    Regards,
    Arlan
     
     
  •  03-29-2008, 10:02 AM 38453 in reply to 38441

    Re: Ajax Uploader Evaluation ~ Demo Problems

    Arlan,
     
     Private Sub Uploader_FileUploaded(ByVal sender As Object, ByVal args As UploaderEventArgs)
       Dim uploader As Uploader = DirectCast(sender, Uploader)
       InsertMsg("File uploaded! " & args.FileName & ", " & args.FileSize & " bytes.") 
                'Copys the uploaded file to a new location.
                'args.CopyTo(path)
                'Opens the uploaded file's data stream.
                'System.IO.Stream data = args.OpenStream()
      End Sub

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  03-30-2008, 9:06 PM 38460 in reply to 38453

    Re: Ajax Uploader Evaluation ~ Demo Problems

    Thanks Adam.
     
    I did not realize you only wanted the value of "path" filled in for the line:
     
    args.CopyTo(path)
     
    The example is now working correctly.
     
    Regards,
    Arlan
View as RSS news feed in XML