I agree with you the plugin lacks in programmatic interaction. At the moment, there is no way to call the plugin's native 'remove file' function. The only thing you can do is use the 'onFileAppend' event to fail the file's validation.
But I realise the need for such functionality and I'm going to make sure it's available next time I update the plugin, hopefully by the end of this week (15th Oct 2007).
musetracks wrote:
I'm working on a project where I'm using two plugins in tandem, if you will. I'm using the MultiFile plugin and the AjaxFileUpload plugin together to validate files (size, etc.) at the time they're selected. The sequence looks like this:
1. User selects a file which triggers the change event.
2. The MultiFile plugin's built-in handler does its then and then a custom handler uses the ajaxFileUpload plugin to upload the selected file for validation, etc.
3. Any errors are returned and reported.
My question is similar to that asked in
this thread. If there's an error, I need to remove the invalid input. I've done this manually, but the manual operation doesn't decrement the counter that is tested for compliance with any max fields setting.
How can I interact more effectively with the MultiFile plugin? Specifically, I'd really like to know if/how I can trigger the plugin's native function to delete a file input. If I can make that happen, then the counter will be decremented automatically for me.
Any help would be much appreciated. Everything I've tried has failed. Badly.
Thank you.
Rob Wilkerson