Closed rafa-acioly closed 8 years ago
I'm trying to make a upload and my application (with slim framework) just return File validation fail, but my validation are;
File validation fail
$file->addValidations(array( new \Upload\Validation\Mimetype(array('image/png', 'image/jpg')), new \Upload\Validation\Size('15M') ));
And the image:
p.s: I'm using ajax.
$(".form").on("submit", function (event) { event.preventDefault(); var formData = new FormData(this); $.ajax({ url: 'upload', type: "POST", data: formData, cache: false, contentType: false, processData: false, success: function(data){ $(".form-upload").slideToggle("slow"); $(".result img").attr("src", data); $(".result").slideToggle("slow"); } }); });
the only thing that i can see is that my response is "404 not found" because the url don't existe; `http://myapp.dev/File validation fail```
Hi @rafa-acioly with this descriptions is hard to understand the error. If your route is 404 I think the route that must is not receive request with data files.
I'm trying to make a upload and my application (with slim framework) just return
File validation fail
, but my validation are;And the image:
p.s: I'm using ajax.
the only thing that i can see is that my response is "404 not found" because the url don't existe; `http://myapp.dev/File validation fail```