Sign up ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Hi all using jquery i want to upload file to solution gallery.

so is that possible to upload file in solution gallery using jquery.


another thing is it possible to upload file in document library using jquery.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

I found that copy file from one document library to other using jquery

         $(document).ready(function () {     

      function handleDropEvent(event, ui) {

             var draggable = $(ui.draggable);     

        var context = SP.ClientContext.get_current();   
          var web = context.get_web();   
          var lists = web.get_lists(); 
            var _destinationlib = lists.getByTitle("My Documents");   

          var currentLib = lists.getByTitle("Excel Library");  
          var currentItem = currentLib.getItemById(44);             
           var File = currentItem.get_file();   
context.executeQueryAsync(function (sender, args) {if (File != null) {var _destinationlibUrl = web.get_serverRelativeUrl() + _destinationlib.get_title() + '/' + File.get_name();                        
context.executeQueryAsync(function (sender, args) {},function (sender, args) {SP.UI.Notify.addNotification('Error copying file', false);                                    SP.UI.Notify.removeNotification(notifyId);                                  showError(args.get_message());                              });                         }                   },                  function (sender, args) {                       alert('Error occured' + args.get_message());                    }                 );             }         });
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.