This is a migrated thread and some comments may be shown as answers.

Get bytes array on client side OR should be able to read file from temporary folder

1 Answer 254 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Mac P
Top achievements
Rank 1
Mac P asked on 24 Jul 2013, 07:29 PM
Hello

I am using radasyncupload on the usercontrol that populates and saves the data using WCF from client side code. There is no postback to server.

Since now there is requirement to upload the file, I am using radasyncupload.  The idea behind that was to read the file from temporary folder from wcf hosted on the same server. However when I look at files it has some junk name and extension as I understand that on postback you move from temporary folder to target folder.

So how can I read the content as bytes from temporary folder. Is there any meta data that will point me to correct file?

Or is there a work around that I can get byte array on the client side and I can pass to wcf on my own. I tried onclientfileuploaded by it doesnot have property in fileinfo object that will give me bytes.

Regards
Manish

1 Answer, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 29 Jul 2013, 11:22 AM
Hi Manish,

For this scenario it would be better if you use Custom Http Handler. This way you will avoid the post back and will be able to send bytes array from the handler to the WCF service. To see how custom handler is used with RadAsyncUpload please take a look at this demo.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
AsyncUpload
Asked by
Mac P
Top achievements
Rank 1
Answers by
Hristo Valyavicharski
Telerik team
Share this question
or