Custom Handler - OnFileUploaded not working

3 posts, 0 answers
  1. JNG
    JNG avatar
    10 posts
    Member since:
    Jul 2012

    Posted 16 Sep 2015 Link to this post

    I'm trying to save uploaded files into a db and return the row id.  I'm having significant problems with getting the uploaded files from the RadTreeView node.  The application allows users to drag/drop a file onto a node. This part is working. However, on the server side, the uploadedfiles is always empty.  So I implemented a custom handler and I can access and save the file at that point. However, I can not access the results object that is returned because my OnFileUploaded event is not getting fired. I need the returned file id so I can open a new window.

    I have a hidden button that is clicked via the OnClientFileUploaded event by doing a postback on the hidden button. 

    Here's my control:

       <rad:RadAsyncUpload runat="server" ID="radUpload" OnClientFilesUploaded="OnClientFilesUploaded" PostbackTriggers="btnUploadFiles"
      DisableChunkUpload="false" EnableFileInputSkinning="false" UploadedFilesRendering="AboveFileInput"  MultipleFileSelection="Automatic" Skin="Default" OnFileUploaded="RadAsyncUpload1_FileUploaded"   OverwriteExistingFiles="true"  OnClientAdded="OnClientAdded" HttpHandlerUrl="~/Tools/CustomHandler.ashx">

     

    Is there another way to access the results object without using the OnFileUploaded event?  

     

  2. JNG
    JNG avatar
    10 posts
    Member since:
    Jul 2012

    Posted 16 Sep 2015 in reply to JNG Link to this post

    I figured out how to do it on the client side. In the OnClientFileUploaded event, I can access the results object with args.get_fileInfo().

    Still curious to know why the OnFileUploaded never gets fired.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Jayzle
    Jayzle avatar
    28 posts
    Member since:
    Dec 2012

    Posted 16 Sep 2015 in reply to JNG Link to this post

    Hi JNG,

     I think OnFileUploaded is a server side event and will be triggered by a postback.

    OnClientFileUploaded on the other hand is a client side event and will be triggered after RadAsyncUpload do an async upload.

Back to Top