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

2 posts, 0 answers
  1. Mac P
    Mac P avatar
    84 posts
    Member since:
    Mar 2010

    Posted 24 Jul 2013 Link to this post

    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
  2. Hristo Valyavicharski
    Admin
    Hristo Valyavicharski avatar
    975 posts

    Posted 29 Jul 2013 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top