OnClientFileUploading args.set_cancel(true) behaviour question

3 posts, 0 answers
  1. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 30 May 2012 Link to this post

    Hi,

    I have an issue where setting args.set_cancel(true) in the OnClientFileUploading event doesn't seem to cancel the upload.

    I have a small working example of this.

    The example checks that you are not uploading two files with the same name.  Upon detecting that you are, it displays an alert and sets the cancel to true.  I note however that when posting back, I still get a FileUploaded server event for each file, including the cancelled one(s).

    How do I know that one of those is actually cancelled?  What is the expected functionality of cancelling the upload through this method?  All that seems to happen is the file indicator turns red but otherwise it seems it makes no difference to functionality.

    Please help! :)

    Andrew
  2. Andrew Currie
    Andrew Currie avatar
    19 posts
    Member since:
    Jun 2008

    Posted 30 May 2012 Link to this post

    Further to this, I note that this is only happening with smaller files.  With larger files this issue does not occur presumably because the combined file size is meaning the file doesn't post back.

    The set_cancel(true) is definitely not working as I would have expected it to.
  3. Peter Filipov
    Admin
    Peter Filipov avatar
    1028 posts

    Posted 01 Jun 2012 Link to this post

    Hi Andrew,

    It happens when silverlight module is used to upload files. Unfortunately the Silverlight plugin is causing some issues that are beyond our control. To avoid the problematic behavior please set DisablePlugins property to true.

    All the best,
    Peter Filipov
    the Telerik team
    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 their blog feed now.
Back to Top