RadUploadHandler In Azure Implementation

8 posts, 0 answers
  1. Rune
    Rune avatar
    5 posts
    Member since:
    Jun 2011

    Posted 25 May 2012 Link to this post

    Hi,

    I've seen several posts related to the limitiation of the RadUpload control regarding cloud storage like Azure, and based on the public issue tracker you dont have any plans for this in the nearby future. So I have a couple of questions.

    - You cannot upload directly to the azure blob storage, but is it possible to use the azure cloud drive as the upload folder?

    - Can the RadUploadHandler (ashx) be used by clients which is not based on any Telerik controls?

    - Do you have any control over the upload folder, ie. I would like to upload multiple files and create a sub folder named as a guid and return that guid to the client.

    Regards
    Rune
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 28 May 2012 Link to this post

    Hello Rune,

     You can personalize the file storage (on the server) with the RadUploadHandler. You can see how to achieve this in our online article here

    The RadUploadHandler is designed to work with the RadUpload control. Although, it interacts with it without knowing exactly what is on the other side, they both use the same Json protocol to transfer the data. Ideally, you would be able to use another control with the upload handler, as long as it uses the same format when sending and receiving data.

    For the upload control to function properly, you need an upload handler, which is hosted on the server. The upload handler itself can save the data (chunks) on the server to a local folder - using TargetFolder or PhysicalTargetFolder properties. I am not quite sure what your scenario is, but if that is not enough to upload to the cloud storage, you can create a separate service that would work with the upload handler and upload the chunks to the cloud once they arrive on the server.

    Greetings,
    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Rune
    Rune avatar
    5 posts
    Member since:
    Jun 2011

    Posted 29 May 2012 Link to this post

    Hi Alex,

    That works just fine.

    Thanks
    Rune
  4. Rune
    Rune avatar
    5 posts
    Member since:
    Jun 2011

    Posted 30 May 2012 Link to this post

    Hi Alex,

    I managed to override some of the methods and then save the files to Azure cloud drive. However, I need to create a uniqe sub folder for each upload (can be multiple files) and when all files are uploaded I return the guid (sub folder name). I can override GetAssociatedData and pass a return value, but my problem is that when I'm uploading big files causing it to send many chunks of data, I cannot keep track of when the upload started and which client it belongs to.

    I don't want to pass additional parameters from the client, so is there some information in each request telling which client and if it's the beginning of an upload?

    Regards
    Rune
  5. Rune
    Rune avatar
    5 posts
    Member since:
    Jun 2011

    Posted 30 May 2012 Link to this post

    Hi again,

    I found the RadUAG_guid in the request params, so I got it working. I attached a sample if there is someone else in the same situation.

    Thanks
    Rune
  6. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 30 May 2012 Link to this post

    Hello Rune,

    I am glad that you managed to fix your issues. However, I noticed that the Handler you sent doesn't contain the code-behind logic. And if you can attach it here, I'm sure it will be highly appreciated by the community.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  7. Rune
    Rune avatar
    5 posts
    Member since:
    Jun 2011

    Posted 31 May 2012 Link to this post

    Oooops, here is the files ;-)

    Thanks
    Rune
  8. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 31 May 2012 Link to this post

    Hello Rune,

    Thank you for sending the code. I converter this thread to a CodeLibrary thread so that the community can download and use your code.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top