Closed CheeseBurger228 closed 8 years ago
Duplicate of #148
Are you sure it's a duplicate? I do not understand, i mean i don't have any issues with form data, everything works fine, but not validation callbacks
@CheeseBurger228 I am sorry for a very late response but I've been "out in the wild" and had no time to do any of the work on the plugin. I'm pretty sure you have solved everything by now. I have recently updated the plugin to deal with ALL the issues that you mention ... and also updated the documentation which did not make clear that validation has to return an error message in case of failed validation, thus returning "true" actually means that the validation has failed. I have also handled problem with res is null error. Please report back if problems persist.
Hello, first i want to say that this package is great!! I'm using this package and i want to setup the validation for the uploaded files, to check if they are images, and check that files are uploaded on client.
If i try to use server methods:
I get the error like this if image is uploaded:
/home/golden-credit.org/.meteor/local/build/programs/server/packages/tomi_upload-server.js:370 W20151001-11:05:35.716(3)? (STDERR) res.writeHead(403, {'Content-Type': 'text/plain'}); W20151001-11:05:35.716(3)? (STDERR) ^ W20151001-11:05:35.733(3)? (STDERR) ReferenceError: res is not defined W20151001-11:05:35.733(3)? (STDERR) at IncomingForm.form.on.on.redirect (packages/tomi:upload-server/upload_server.js:350:1)
I also tried to use the client-side validation, to check if the user uploaded file in template, like so:
Template.multiStepForm.helpers({
and in html:
But it breaks the upload script somehow, when i set 'callbacks=myCallbacks' i can no longer upload file, if i select the file, it doesnt appera in input box etc. How do you use it properly, am i doing something wrong??