Rank: Newbie Groups: Member
Joined: 3/2/2009 Posts: 1
|
Hello, sorry if this is a duplicate post, I'm a newbie here and I don't see how to search the forum.
My company is evaluating purchasing the AjaxUploader control. I've downloaded the Web controls, created a test solution, and have uploaded a file.
I understand that the uploaded files exist in the PostedFiles property.
We would like to save the binary (not the file name/string) of the file to a SQL Server table.
My question is... once I've uploaded, and (for example) clicked a "Submit" button, how would I access the binary form of the file via the PostedFiles property?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi, The AJAXUploader ALWAYS gives you a physical file. So you would get the TempFileName from PostedFiles and that will be end of with AJAXUploader. Once you have the file name, you save that file to your database. This part has nothing to do with the uploader. We do not offer support on this part, however here is an article about this for your reference: http://www.akadia.com/services/dotnet_read_write_blob.htmlThe article should provide all the code you need to read a file into a byte array, then save that byte array to your database. Thanks!
|