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

Support multiple upload queues in one form #8

Open Jako opened 8 years ago

sonicpunk commented 7 years ago

How does the roadmap look on this function? It would be great to have more than one upload input on a form.

Jako commented 7 years ago

Too less time at the moment.

jcdm commented 7 years ago

@Jako A far as you're aware, would this be as simple as making the snippets able to process comma delimited lists of settings?

i.e. if someone followed the path through the preHooks and Hooks looking for instances of ajaxuploadFieldname, ajaxuploadTarget and ajaxuploadUid and made them able to run per-setting in a comma separated list, would that likely do the job or are there reasons to believe it would be harder than that?

jcdm commented 2 years ago

I've just attempted to place two different upload queues on the same page and it appears to have worked*.

Jako commented 2 years ago

@jcdm If you want, you can send the stripped custom hook and I will add this to the docs. Or you can create a PR here: https://github.com/Jako/AjaxUpload/tree/master/docs

adamwintle commented 6 months ago

I've found myself in a situation where I also need to use two AjaxUpload snippets for one FormIt; with different behaviour for each AjaxUpload.

Was this solution ever documented anywhere and was the necessary code ever merged?

Jako commented 5 months ago

No, @jcdm did not sent his solution. But there is a difference between multiple queues on one page (he mentioned this) and in one form handled by FormIt.

The upload data is saved in the session, the upload queues are separated with uids. But it is not possible to have multiple uids in the AjaxUpload hooks. The hook code has to be extended to use multiple fieldnames and multiple uids. Maybe there has to be something added in the main class too.