Mapping FolderName to Upload files to Sharepoint Document Library

Feb 23, 2011 at 3:23 PM

Hi!

   Is there any possibilities to map "FolderName" property to a folder in a Sharepoint Document Library? I've tried to map the FolderName to webDav root but is not working. I want to upload files into a custom folder in a custom document library and I've read people could do that.

   Can anyone help me with this issue?

Thanks guys!

Feb 23, 2011 at 11:08 PM

Use the "OnFileReceived" server side method of the fileuploader to do this.

<fjx:FileUploader ID="FileUploader1" runat="server" onFileReceived="FileUploader_FileReceived"></fjx:FileUploader>
                        

protected void FileUploader_FileReceived(object sender, FileReceivedEventArgs e)
    {
        string savePath = @"\\MyServer\MyPath\";

        e.File.SaveAs(@savePath + e.File.FileName.ToString());
    }