Search code examples
javascriptjqueryfine-uploaderphpfox

Keeping the original behavior of a file input in Fine-Uploader


My problem is this: i have a form with a file input. This file input has a onchange event attached. How can i add Fineuploader to handle things like validation (fize size, format,), thumbnail previews, but not the upload of the files and keep the original behavior of the file input?


Solution

  • If you want to take advantage of many of Fine Uploader's features (chunking, progress, etc.) you're going to need to make sure your upload endpoint is set up the correct way. PHPFox's source is not open so I cannot see how their upload endpoint(s) work. One idea is to contribute your own. We have PHP examples.

    Another theoretical idea is to turn autoUpload off in Fine Uploader. Use addFiles or addBlobs to add files to Fine Uploader from the input element's onchange, then use drawThumbnail, validate, etc. on Fine Uploader's files, but then have the actual file/form submission occur via the PHPFox addon form (i.e., Fine Uploader's upload button does nothing). FU's API methods and Core Options are going to be essential for this.