Jako / AjaxUpload

Snippet/jQuery Wrapper for Andrew Valums file upload in MODX Revolution
https://jako.github.io/AjaxUpload/
GNU General Public License v2.0
10 stars 18 forks source link

Not working on ajax-loaded page #55

Closed DmitryFX closed 2 years ago

DmitryFX commented 2 years ago

I load the resource via JQ .get, the formit works well on such page, but ajax upload first showed nothing. I tried to include style, script and inline script manually (in the fenom {ignore} tags) on that page, ajax upload appeared and "reacts", but ignores at least maxFiles setting and I'm not sure is working correctly. E.g. &maxFiles=10 and .ajaxUpload({ maxFiles: 10 }) do nothing, still 3 files limit.

Jako commented 2 years ago

The settings (i.e. maxfiles) are stored for each upload queue in session. The session is initialized by the AjaxUpload snippet. So you have to make sure, that the snippet is called on the resource loaded with JQ .get and the script is initialitzed with the right upload queue.