Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rename file that user uploads javascript

I have the following html on a form:

<input type="file" name="uploadField" />

When users click on the browse button they can select any file but I want to rename the file using the value of another field on the form

I have a submit button. Can I do it here?

like image 568
user1571352 Avatar asked May 15 '13 15:05

user1571352


1 Answers

I know the question is old but if anyone is still struggling with similar problem, please try to use append() or set() method of the FormData.

like image 97
Kamil Avatar answered Sep 21 '22 03:09

Kamil