angularjs - validate form fields before uploading file (Blueimp jquery file upload) -
I'm working on the blueimp file (the version of the Angularus), I want to validate the form before uploading the file, I have to say that names and details are included and I want these files to be provided before uploading.
I have tried this code so far till the coaler wanted to use form validation
$ scope $ ('Fileuploadsubmit', function (event, files) {if its file name} {// its a farm field} : File.name, templateName: _uploadTemp.name};});} and {form.submit = true}});
By doing so, I see an error on the filename, but also submits the file to the server. Is there any way that I can stop uploading the file and show the error ??
Any help would be appreciated, just to mention that using the BLUEIMP file, upload AngularJs version
I have actually made a directive for this purpose. The code I pasted was for you to just give instructions on how the instruction should be. Sorry for not putting a working version, if I get time today / tomorrow I will make it work. It can take 1-2 hours to remove all dependencies
Valid values in JavaScript Specify
$ scope.fileValidations = {extension: "xlsx", required: true}; & Lt; Cs-file-upload ng-model = "selected.filename" file-info = "selected.fileInfo" assumptions = "file validity" & gt; & Lt; / Cs-file-upload & gt;
I am using an angular-file-upload module for this, which should work more or less like the auction.
I will definitely try to install the working version till tomorrow ...
Comments
Post a Comment