Hi,
We host a number of clients from a common site. When we upload files we like to send them to different locations dependant on who the client is. Please add a property to the control that would allow us to set the file path dynamically.
I would guess this would be a fairly common request.
Thanks.
HI Miro,
Yes, I know I can rename the file but when we have multiple users saving the files I need to be able to have a global static variable which holds the name of the file and pass it back and forth to the client. However the global static variable on the server is dangerous if we cannot associate the name of the file with the user name otherwise sharing this variable will create a mess. How do I get the user name in the
OnFileFinished event, it seems this is stateless and I do not have a way to get the context in this event?
Hi corydowd,
Did you use FileUpload asp.net wrapper. If yes then you can use server-side event OnUploadFinishing. Here is example for Upload Finishing event handler http://help.infragistics.com/Help/NetAdvantage/ASPNET/2011.1/CLR4.0/html/WebUpload_HTTP_Module_and_Handler.html
You can cancel this event and Save the file where you want. The idea is that fileUploadPath proprty is temporary folder where files are saved with temporary names. When the file is uploaded it is renamed to its original name. But the developer can attach to server side event onUploadFinishing and when the file is uploaded he could renamed/ delete/move(or what he wants to do) this file.
I hope this post will be helpful for you.
Regards,Miro Hristov