pri_dev
pri_dev

Reputation: 11645

file selector from disk option in grails

I want to create a simple gsp page which will have an input box with a 'load from disk' button onclick of which a file selector dialog opens up allowing me to select a file and displaying the whole path into the text box after selection. I eventually plan to read this file contents into database.

What input type is used for file selector option? Thanks

Upvotes: 0

Views: 769

Answers (1)

sbglasius
sbglasius

Reputation: 3124

You should use

<input type="file" id="payload" name="payload"/>

Try google for 'grails file upload' and you will find multiple examples

Upvotes: 2

Related Questions