Reloading Uploader on page


#1

Is there any code that I can use to reload the uploader container?

I am looking something similar to this code which I have found in the docs and refreshes the media gallery. I am working on something where I need to refresh the uploader as well.

    jQuery( '.rtm-custom-sort-like' ).on( 'click', function( e ){
      jQuery( '#rt_upload_hf_custom_sort_by' ).val( 'likes' ); // set sort by likes
      jQuery( '#rt_upload_hf_custom_sort_order' ).val( 'desc' ); // set sort order to descending

      // galleryObj is the object for rtMedia gallery Backbone collection.  This is what I am referring to below.
      if ( typeof galleryObj == "object" ) {
        galleryObj.reloadView();
      }
     });

#2

I figured it out. You may close this topic.


#3

Hello @LearntoDesign,

We are glad to know that you figured out the solution.

Feel free to create a new thread if you need any help in future.

Thank you.


#4