Which folder are images?

Last post 05-05-2009, 2:15 PM by cutechat. 3 replies.
Sort Posts: Previous Next
  •  04-24-2009, 10:56 AM 51506

    Which folder are images?

    When i use only the UploadAttachments control, i select the image to upload, but i dont know where the image was save, the tempDirectory is = ~/upload, and i dont know  after i uppload for example 2 images, the appear in a grid, but if i do a refresh page the grid disapere i presume it is because the images they wont be save anywere in server.
     
    Can somebody help me?
     
    Thanks
  •  04-24-2009, 11:17 AM 51510 in reply to 51506

    Re: Which folder are images?

    xtinction84,
     
    The files are uploaded into the temp folder after when the files name appears in the grid.
     
    In your own applications, you need to use the .Copyto method to save the files to the target location.
     
    For example:
     
    1. void ButtonTellme_Click(object sender, EventArgs e)   
    2.       {   
    3.           ListBoxEvents.Items.Clear();   
    4.           foreach (AttachmentItem item in Attachments1.Items)   
    5.           {   
    6.               InsertMsg(item.FileName + ", " + item.FileSize + " bytes.");   
    7.   
    8.               //Copies the uploaded file to a new location.   
    9.               //item.CopyTo("c:\\temp\\"+item.FileName);   
    10.               //You can also open the uploaded file's data stream.   
    11.               //System.IO.Stream data = item.OpenStream();   
    12.           }   
    13.       }  

    Hope it helps.
     
    The source code of this example http://ajaxuploader.com/Demo/select-multiple-files-upload.aspx can be found in the download package.

    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

  •  04-24-2009, 11:53 AM 51513 in reply to 51510

    Re: Which folder are images?

    Adam,
     
    Thanks!! 
     
    Now i have only one question, it is possible to make always visible the grid, with files that i have upload? And make use of remove buttons, etc.After i refresh the page without disappear the grid?
     
    Thanks
  •  05-05-2009, 2:15 PM 51838 in reply to 51513

    Re: Which folder are images?

    Hi,
     
    The UploadAttachment keep the state for postbacks.
     
    If you want to show the items every time the page loads,
     
    That is application logic.
     
    Please check the advanced sample , the FileManager , or EditTopic sample.
     
    Regards,
    Terry
     
View as RSS news feed in XML