Reputation: 5563
I have a form which has some input fields along with file object. Once the form is submitted, validation would happen in server side. If validation fails I need to show the same page to the user with the values he/she given. Im able to retain all the values except file object.
Is it possible in Playframework?
Upvotes: 0
Views: 134
Reputation: 37675
Even if you could find a suitable way to send the file object back to the browser I do not believe it is possible to set the value of an <input type="file" />
due to security restrictions.
I would recommend validating the form in the browser first before uploading the data. If you do not want to write a load of validation code yourself then you could use a jquery validation plugin.
Upvotes: 1