I know that someone filed an issue about this (#44) Has it been merged? Any news on this? Thanks
https://github.com/caolan/forms/tree/file_input is the branch… it hasn't been merged. I asked the submitter of #44 to test it for me, and they decided not to do so. Please reopen #44, and please test it yourself, if you'd like to see it merged.
just tested it, it adds this:
"input type="text" name="testfile" id="id_testfile"
. It does not work as expected. How can I reopen this issue?
Thanks! I'll do some more work on it and update this issue. To reopen, there's a green "reopen" button on the bottom - I'll reopen it now.
Hi! Any news on this ljharb? Thanks
I haven't had a chance to work on it yet - I've just taken another look, and it's mostly done - I need to make the example work with multipart form data first.
I've updated the file_input branch - it creates the input field just fine, and it helped me to figure out that forms needed to handle multipart submissions. However, forms currently only gets "fields" to validate, not "files" - so this is a very complex feature request that will take awhile to get right.
Any progress on this feature?
Has anyone found a way to implement this yet?
@danielst-vccp: I made a custom image uploader field for a project of mine, if you want to have a reference on how one can approach that: https://github.com/voxpelli/node-one-page/blob/9b2f57bbedf68aa54cbe291d1879741a7da28b7a/lib/utils/forms.js#L22-75 It in turn uses https://github.com/mscdex/connect-busboy to handle the uploaded data and pipes that to Cloudinary.
Not sure if I could wrap that up as a more generic PR or how it relates to the mentioned stale branch, but wanted to point out that it is possible to get fields to work with this module today, even if it is less handy than it could be.
@danielst-vccp https://github.com/caolan/forms/compare/file_input is my attempt, but it's not working yet, and I haven't had a chance to work on it in awhile.
@voxpelli @ljharb very helpful, will take a look, thanks chaps.