0

I have a page with some input fileds (like name, password and etc.). Where the user click on submit, it loads all the fields to a file which located in the server.

I want to create another field, which is input type for file, that upload the file with specific location

Here is the relevant code

input filed:

<input type="text" name="arr" class="form-control" ng-model="arr['1']" required="">

input file form:

<input type="file" name="fileToUpload" id="fileToUpload">

The submit button:

<button type="submit" style="float:center;" class="btn btn-primar" ng-click="submitForm(true)">Submit</button> 

submitForm is loaded the field to a specific file.

I have php script for upload files.

My issue is that I want that when I'll click on submit, it will do both: upload the file and load all the fileds to specific file (execute the php file and the submitForm function). In all the example I see, the upload process is a seprate process (with submit button for the specific file).

1 Answer 1

0

Maybe try using something like this. Might be helpful.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks, I try to use it by define: file.upload = Upload.upload({ url: '/tmp', data: {file: file, username: $scope.username}, }); The problem is that I want to save it on my machine (on tmp folder), but it search url. There is any way to save it on the machine (the localhost from where the application is running)?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.