YS 3.4 : File upload max_concurrent_uploads BUG

mastern

New Member
YetiShare User
Apr 24, 2013
56
1
0
Hi Adam,

I continue to track all bugs i meet. This is a new bug found for file uploader :

- the free_user_max_concurrent_uploads - The maximum amount of files that can be uploaded at the same time for free users. - (the same with non-user or paid/premium user) : Not work. free users can upload unlimited files at once, bypassing the number in config var.

- When i set the free_user_max_concurrent_uploads = 1. All file upload return Error: Maximum number of files exceeded Even if i just add 1 file.

Do you know how to solve it ?

Regards,
Maverick
 

Attachments

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

The setting for non users is 'non_user_max_concurrent_uploads'. I noticed you're not logged in. free_user_max_concurrent_uploads only applies to logged in free users. Can you test with the non_user one?

Regards,
Adam.
 

mastern

New Member
YetiShare User
Apr 24, 2013
56
1
0
Hi Adam,

I confirm, it's not work for free_user_max_concurrent_uploads (logged in) or non_user (not logged in).
- free_user_max_concurrent_uploads = 1 (return error even a single file)
- free_user_max_concurrent_uploads = 2 or >2 (the file uploader don't count the rule).

The same for non-user or premium-user (if not set to 0).

Regards,
Maverick
 

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
Hi,

I've looked into this a bit more and I've been able to replicate the issue in our dev environment. It'll take a bit of investigation to fix as it's buried in the file upload javascript.

We're preparing for a new release over the next week or so, so I'll look at it properly before then.

Regards,
Adam.
 

mastern

New Member
YetiShare User
Apr 24, 2013
56
1
0
Hi Adam,

It seems that the issue is global for previous fileUpload Jquery for maxNumberOfFiles. call.

I updated to Jquery FileUpload 9.5.6 as YS use an old version. 8.XXX. I overwrite directly the 5 js file in YS 3.4 /js/ (ui,process,validate,fileupload.js,iframe-transport.js).
The uploader is more fast with these update but the maxFileSize is not recognized too. The latest Jquery FIleUpload need a lot of attention before winning!

But maxNumberOfFiles. don't work so the tips here work well but i don't know how to modify YS 3.4 _indexJS.inc.php for the latest Jquery FIleUpload API.

See: https://github.com/blueimp/jQuery-File-Upload/issues/2968

Code:
$('#fileupload').fileupload('option', 'maxNumberOfFiles', 2);
Just need a little modification and everything will be good. (see file attached - see the console)

Regards,
Maverick
 

Attachments

adam

Administrator
Staff member
Dec 5, 2009
2,043
108
63
I've fixed this for the v3.5 release, it'll be in the final code released later this week. If you want to patch it in the mean time, open _index.JS.inc.php and find:

Code:
xhrFields: {
    withCredentials: true
},
On a new line after it add this:

Code:
getNumberOfFiles: function () {
    return getTotalRows();
},