0

I am trying to change main.js for blueimp upload files to have multiple file upload widgets on the same page. I changed id to class for form. I also changed in main.js:

$('.fileupload').each(function () {
    $(this).fileupload({
        dropZone: $(this)
        url: 'server/php/'
    });
});

$('.fileupload').each(function () {
    $(this).fileupload({
        dropZone: $(this)
        'option',
        'redirect',
        window.location.href.replace(
        /\/[^\/]*$/,
        '/cors/result.html?%s'
    )
   });
}); 

still not working. Any idea? Thanks a lot. katarina

wikinka
  • 1
  • 4
  • Look at the JavaScript console and see what errors you're receiving. – y-- Mar 01 '14 at 08:49
  • Are you getting any error in console – James Mar 01 '14 at 08:55
  • I checked it and I found 0 errors there :-( – wikinka Mar 01 '14 at 09:02
  • 09:55:17.378 "Invalid App Id: Must be a number or numeric string representing the application id." all.js:56 09:55:17.383 "The "fb-root" div has not been created, auto-creating" all.js:56 09:55:17.402 "FB.getLoginStatus() called before calling FB.init()." – wikinka Mar 01 '14 at 09:04
  • @wikinka sorry I'm not able to figure out your problem. Just confirm whether that plugin requires `id` of your `div`. go through its documentation. – James Mar 01 '14 at 09:14
  • Thank you james I'll try different way how to do it. have a nice day. k – wikinka Mar 01 '14 at 10:00

1 Answers1

0

on the page where you create the two instance of upload widget you should give the action parameter to your forms.

<form class="fileupload" action="server/php/" method="POST" enctype="multipart/form-data">

<form class="fileupload" action="server/php2/" method="POST" enctype="multipart/form-data">

In the main.js you should use this attribute of your form to call the different upload handlers:

$('.fileupload').each(function () {
 var action = $(this).attr('action');
 
    $(this).fileupload({
  dropZone: $(this),
  url: action,
 });
});
Kepner
  • 1