{"id":733,"date":"2010-05-14T20:44:29","date_gmt":"2010-05-14T15:14:29","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=733"},"modified":"2016-12-19T15:04:55","modified_gmt":"2016-12-19T09:34:55","slug":"handy-guploadform","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/handy-guploadform\/","title":{"rendered":"Handy g:uploadForm"},"content":{"rendered":"<p>It is very easy and handy to use Grails &lt;g:uploadForm&gt; tag insteed of using HTML &lt;form&gt; tag or grails &lt;g:form&gt; tag, as you don&#8217;t need to set the enctype attritbute to multipart\/form-data (as in case of HTML &lt;form&gt; tag or grails &lt;g:form&gt; tag) to work with file upload.<\/p>\n<p>for example insteed of using:<\/p>\n<blockquote>\n<pre lang=\"groovy\">\r\n<g:form name=\"myForm\" controller=\"myController\" action=\"myaction\" id=\"1\" enctype=\"multipart\/form-data\">...<\/g:form>\r\n<\/pre>\n<\/blockquote>\n<p>,We can just use<\/p>\n<blockquote>\n<pre lang=\"groovy\">\r\n<g:uploadForm name=\"myForm\" controller=\"myController\" action=\"myaction\">...<\/g:uploadForm>\r\n<\/pre>\n<\/blockquote>\n<p>with all same features!!!<\/p>\n<p>~~Niraj Kumar~~<br \/>\nniraj@intelligrape.com<\/p>\n<p>http:\/\/www.tothenew.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is very easy and handy to use Grails &lt;g:uploadForm&gt; tag insteed of using HTML &lt;form&gt; tag or grails &lt;g:form&gt; tag, as you don&#8217;t need to set the enctype attritbute to multipart\/form-data (as in case of HTML &lt;form&gt; tag or grails &lt;g:form&gt; tag) to work with file upload. for example insteed of using: &#8230; ,We [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1},"categories":[7],"tags":[4840,237],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/733"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=733"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/733\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}