I'm trying to use the demo that is on the devexpress website to build a folder structure that people can upload files to and manage within a web interface.
http://d开发者_如何学编程emos.devexpress.com/ASPxTreeListDemos/Editing/FileManager.aspx
I have got the control to work, however, when I upload a file to via the web interface, the control doesn't stream the whole file up to the server, but just creates a new file but with no content.
Is there something that I can do to create the file.
I didn't have access to the FileManagerHelper Class, but googled around and found on on the devexpress forum.Is there an updated version of this file?
Many thanks
After going through the FileManagerHelp Class, I have solved my problem.
The demo that is on the link that uses the FileManagerHelp class, has some code missing that physically saves the file to disk as they dont want the server filling up with redundant files.
To Solve this, you will need to pass in a byte array of the file into BeginUploadFile and then write the byte array to the file. You will also need to remove the PerformCleanupCore() Function as this will deleted the redundant files from the server.
Also You will need to remove Directory.SetCreationTime(name, DateTime.Now) from the RootFolder() function if you have problems with permissions on your folders as it will crash the application say that the file/folder are unaccessable.
What I use is DevExpress.Web.ASPxUploadControl, and then I do some post-upload tasks (creating thumbs, etc.) in the FileUploadComplete event.
精彩评论