{"id":4512,"date":"2011-11-18T19:17:50","date_gmt":"2011-11-18T13:47:50","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=4512"},"modified":"2017-03-20T17:05:11","modified_gmt":"2017-03-20T11:35:11","slug":"uploading-multiple-files-with-same-name","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/","title":{"rendered":"uploading multiple files with same name"},"content":{"rendered":"<p>A good binding feature in grails is that when you have multiple input fields with same name, they are available as a list in <code>params<\/code>. But this does not hold with html file input fileds. If you have multiple file input fields with same name, <code>params.fieldName<\/code> will not return a list but the first input field with name <code>fieldName<\/code>.  This is due to using <code>fileMap<\/code> attribute of <code>request<\/code> object. Here is the relevant part of <code>GrailsParameterMap<\/code> class(I suspected this class because of <code>params.getClass()<\/code> returned <code>GrailsParameterMap<\/code>) : <\/p>\n<p>[groovy]<br \/>\n    GrailsParameterMap(HttpServletRequest request) {<br \/>\n\t\/\/&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\n        if (request instanceof MultipartHttpServletRequest) {<br \/>\n            def fileMap = request.fileMap<br \/>\n            for (fileName in fileMap.keySet()) {<br \/>\n                requestMap.put(fileName, request.getFile(fileName))<br \/>\n            }<br \/>\n        }<br \/>\n\t\/\/&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\n    }<br \/>\n[\/groovy]<br \/>\nDue to above implementation, If you have three file input fields with name <code>familyPics<\/code>, only the first one will be available via <code>params.familyPics<\/code> of type <code>CommonsMultipartFile<\/code>. <\/p>\n<p>\nIn one of the mail thread(links at the end of the blog), I got to know that grails uses <em>Spring 3.0<\/em> starting from <em>grails version 1.2<\/em> which supports <code>multiFileMap<\/code> attribute in <code>request<\/code> object. Using this attribute you can access multiple files from inputs with the same name (or that uses the <em>HTML5<\/em> multiple attribute). So if the implementation is changed to something like :<br \/>\n[groovy]<br \/>\n   GrailsParameterMap(HttpServletRequest request) {<br \/>\n\t\/\/&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\n        if (request instanceof MultipartHttpServletRequest) {<br \/>\n                    def multipleFileMap = request.multiFileMap<br \/>\n\/* instead of using fileMap. However this map value is always a list even if there is only one file input for a name *\/<br \/>\n                    multipleFileMap.each {fieldName, files -&amp;amp;gt;<br \/>\n                        if (files.size() == 1) {<br \/>\n                            requestMap.put(fieldName, files.first())<br \/>\n\/* Make this available as a single element instead of list, if the user wants he can use params.list(&#8216;fieldName&#8217;) for list version *\/<br \/>\n                        } else {<br \/>\n                            requestMap.put(fieldName, files)<br \/>\n                        }<br \/>\n                    }<br \/>\n        }<br \/>\n\t\/\/&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..<br \/>\n    }<br \/>\n[\/groovy]<br \/>\nThen if there are three file input fields with name <code>familyPics<\/code>, then <code>params.familyPics<\/code> will return a list of <code>CommonsMultipartFile<\/code> objects. If there is only one file input field with name <code>profilePic<\/code> then <code>params.profilePic<\/code> will return an object of type <code>CommonsMultipartFile<\/code> and <code>params.list('profilePic')<\/code> will return a list of <code>CommonsMultipartFile<\/code> objects.<\/p>\n<p style='padding-bottom:20px;'>\n<p>This feature can be added using <em>Groovy\/Grails MetaProgramming<\/em>(Until grails is updated for this feature). However I went with <em>Grails Filter<\/em> solution. Create\/update a filter with this entry :\n<\/p>\n<p>[groovy]<br \/>\n        multipartFileSupport(controller: &#8216;*&#8217;, action: &#8216;*&#8217;) {<br \/>\n            before = {<br \/>\n                if (request instanceof MultipartHttpServletRequest) {<br \/>\n                    def multipleFileMap = request.multiFileMap<br \/>\n                    multipleFileMap.each {fieldName, files -&amp;amp;gt;<br \/>\n                        if (files.size() == 1) {<br \/>\n                            params.put(fieldName, files.first())<br \/>\n                        } else {<br \/>\n                            params.put(fieldName, files)<br \/>\n                        }<br \/>\n                    }<br \/>\n                }<br \/>\n            }<br \/>\n        }<br \/>\n[\/groovy]<\/p>\n<p>Now inside any controller\/action you can access statements like(even grails auto binding will work fine) :<br \/>\n[groovy]<br \/>\n\/* Suppose there is a file input field with name profilePic *\/<br \/>\nCommonsMultipartFile profilePic=params.profilePic<br \/>\nList&amp;amp;lt;CommonsMultipartFile&amp;amp;gt; profilePicAsList=params.list(&#8216;profilePic&#8217;)<\/p>\n<p>\/* Suppose there are three file input fields with same name familyPics *\/<br \/>\nList&amp;amp;lt;CommonsMultipartFile&amp;amp;gt; familyPics=params.familyPics<br \/>\n[\/groovy]<\/p>\n<p>Hope this feature will be available soon in grails without having to write filters or doing meta programming.<\/p>\n<p style='padding-bottom:20px;'>\n<p>Helpful links : <\/p>\n<p><a href=\"http:\/\/stackoverflow.com\/questions\/3710232\/how-to-iterate-over-uploaded-files-in-grails\">http:\/\/stackoverflow.com\/questions\/3710232\/how-to-iterate-over-uploaded-files-in-grails<\/a><\/p>\n<p><a href=\"http:\/\/forum.springsource.org\/showthread.php?44632-CommonsMultipartResolver-Uploading-many-files-with-same-html-name\">http:\/\/forum.springsource.org\/showthread.php?44632-CommonsMultipartResolver-Uploading-many-files-with-same-html-name<\/a>\n<\/p>\n<p style='padding-bottom:20px;'>\n<p>~~~~~~Cheers~~~~~~~<br \/>\nBhagwat Kumar<br \/>\nbhagwat(at)intellligrape(dot)com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":14,"footnotes":""},"categories":[7],"tags":[684,686,636,685,687,688],"class_list":["post-4512","post","type-post","status-publish","format-standard","hentry","category-grails","tag-commonsmultipartfile","tag-filemap","tag-grails-filters","tag-grailsparametermap","tag-multifilemap","tag-multiple-html-file-input"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Bhagwat Kumar\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"uploading multiple files with same name | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"uploading multiple files with same name | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#article\",\"name\":\"uploading multiple files with same name | TO THE NEW Blog\",\"headline\":\"uploading multiple files with same name\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2011-11-18T19:17:50+05:30\",\"dateModified\":\"2017-03-20T17:05:11+05:30\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#webpage\"},\"articleSection\":\"Grails, CommonsMultipartFile, fileMap, grails filters, GrailsParameterMap, multiFileMap, multiple HTML file input\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"position\":2,\"name\":\"Grails\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#listItem\",\"name\":\"uploading multiple files with same name\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#listItem\",\"position\":3,\"name\":\"uploading multiple files with same name\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/grails\\\/#listItem\",\"name\":\"Grails\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/\",\"name\":\"Bhagwat Kumar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d6c506f803fe26906ef802b1eaee463146e449a8b5b3d1f7e4ebc715b933d620?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Bhagwat Kumar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/\",\"name\":\"uploading multiple files with same name | TO THE NEW Blog\",\"description\":\"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/uploading-multiple-files-with-same-name\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/bhagwat\\\/#author\"},\"datePublished\":\"2011-11-18T19:17:50+05:30\",\"dateModified\":\"2017-03-20T17:05:11+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"uploading multiple files with same name | TO THE NEW Blog","description":"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.","canonical_url":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#article","name":"uploading multiple files with same name | TO THE NEW Blog","headline":"uploading multiple files with same name","author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"},"datePublished":"2011-11-18T19:17:50+05:30","dateModified":"2017-03-20T17:05:11+05:30","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#webpage"},"isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#webpage"},"articleSection":"Grails, CommonsMultipartFile, fileMap, grails filters, GrailsParameterMap, multiFileMap, multiple HTML file input"},{"@type":"BreadcrumbList","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/www.tothenew.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","position":2,"name":"Grails","item":"https:\/\/www.tothenew.com\/blog\/category\/grails\/","nextItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#listItem","name":"uploading multiple files with same name"},"previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#listItem","position":3,"name":"uploading multiple files with same name","previousItem":{"@type":"ListItem","@id":"https:\/\/www.tothenew.com\/blog\/category\/grails\/#listItem","name":"Grails"}}]},{"@type":"Organization","@id":"https:\/\/www.tothenew.com\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/www.tothenew.com\/blog\/"},{"@type":"Person","@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author","url":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/","name":"Bhagwat Kumar","image":{"@type":"ImageObject","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/d6c506f803fe26906ef802b1eaee463146e449a8b5b3d1f7e4ebc715b933d620?s=96&d=mm&r=g","width":96,"height":96,"caption":"Bhagwat Kumar"}},{"@type":"WebPage","@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#webpage","url":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/","name":"uploading multiple files with same name | TO THE NEW Blog","description":"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/www.tothenew.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/#breadcrumblist"},"author":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"creator":{"@id":"https:\/\/www.tothenew.com\/blog\/author\/bhagwat\/#author"},"datePublished":"2011-11-18T19:17:50+05:30","dateModified":"2017-03-20T17:05:11+05:30"},{"@type":"WebSite","@id":"https:\/\/www.tothenew.com\/blog\/#website","url":"https:\/\/www.tothenew.com\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/www.tothenew.com\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"uploading multiple files with same name | TO THE NEW Blog","og:description":"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.","og:url":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/","og:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"uploading multiple files with same name | TO THE NEW Blog","twitter:description":"Grails does not support accessing multiple file input fields with same name using params.fieldName. We need to use request.multiFileMap (available in Spring 3.0) instead of request.fileMap. The blog provides sample code to achieve this feature via Grails Filter.","twitter:image":"https:\/\/www.tothenew.com\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"4512","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:13:04","updated":"2024-02-29 10:56:25","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/www.tothenew.com\/blog\/category\/grails\/\" title=\"Grails\">Grails<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tuploading multiple files with same name\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/www.tothenew.com\/blog"},{"label":"Grails","link":"https:\/\/www.tothenew.com\/blog\/category\/grails\/"},{"label":"uploading multiple files with same name","link":"https:\/\/www.tothenew.com\/blog\/uploading-multiple-files-with-same-name\/"}],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/4512","targetHints":{"allow":["GET"]}}],"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\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=4512"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/4512\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=4512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=4512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=4512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}