-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Lazily bind forms for form support #1334
Comments
Fine Uploader doesn't depend on jQuery internally. In fact, I'm toying with the idea of deprecating/removing the jQuery wrapper in a future version, see #1310 for details. Seems like it wouldn't be difficult to add an API method to update/set the bound form, which could be called anytime after init. |
Apologies, jquery wasn't an important part of the api (only habitually added it). Replace that with a dom node representing the form. Glad to hear there's value in adding the capability to core. Any foreseeable hiccups with implementing this? Any good place to start digging? I'll likely implement it in my fork (for immediate use in production) and potentially bring it to fineuploader core if it works. Thanks for your speedy response and continued support. |
Well you know how it is. First step is to say something is trivial. Second step is to start working on it and realize that you've opened a can of worms. That said, this doesn't appear to be an overly difficult adjustment. I would imagine a new public method would be added to the API: When the new API method is called, Fine Uploader will run the |
Thanks for the details @rnicholus. I'll give it a go in my fork and report back. |
Looking into this now as part of 5.3.0 work. |
This is complete in the develop branch - 5.3.0-7. |
Awesome work! Thanks.
|
I have a use case where one popup shows the upload button (instantiating an uploader) and after submission, another popup renders the submitted image along with a form (for annotating the image). The form does not exist at the time of uploader creation, but I would still like to leverage form support (since the submitted image is to be uploaded along with the form data).
I know that the form is expected to be part of the uploader's initialization options, but is there currently a way to bind to a form after instantiation?
If there is no current way of doing this, do you see value in lazy binding? I'm thinking of something like a
uploader.bind($form)
as the public api. If a form element is supplied in the options, fineuploader would then callbind
internally.The text was updated successfully, but these errors were encountered: