

{"id":82028,"date":"2020-09-10T09:00:30","date_gmt":"2020-09-10T03:30:30","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=82028"},"modified":"2021-08-25T13:47:12","modified_gmt":"2021-08-25T08:17:12","slug":"jsp-file-uploading","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/","title":{"rendered":"JSP File Uploading to the Server"},"content":{"rendered":"<p>Using the functionality of uploading a file, a user can upload multiple files at the server-side. HTML, along with JSP, is used for this. The file can be a text file, image, binary file, or any document.<\/p>\n<h2><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82031\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg\" alt=\"JSP File Uploading\" width=\"1200\" height=\"628\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg 1200w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading-300x157.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading-1024x536.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading-150x79.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading-768x402.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading-520x272.jpg 520w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/a><\/h2>\n<h2>File Uploading in JSP<\/h2>\n<p>There are two ways to upload a file to the server in JSP:<\/p>\n<p><strong>a) Using third party Jar File \u2013<\/strong> Apache has given a powerful API to upload files. This approach will require two jar files that will be in WEB-INF\/lib directory of the application. Download these jar files<\/p>\n<ul>\n<li>commons-fileupload.jar<\/li>\n<li>commons-io.jar<\/li>\n<\/ul>\n<p><strong>b) Servlet 3.0 API &#8211;<\/strong> Servlet 3.0Specification gives support for uploading files without including any third party APIs.<\/p>\n<p>Let\u2019s understand uploading a file on the server in detail:<\/p>\n<h3>Creating an Upload Frontend<\/h3>\n<p>Here we use the HTML to create the front end for the uploading of files. Following attributes may be used in the code.<\/p>\n<p><strong>1. action attribute:<\/strong> This attribute will forward the request to another resource.<br \/>\nSyntax:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">form action = \"UploadForm\" \r\n<\/pre>\n<p><strong>2. method attribute:<\/strong> This attribute will define the HTTP method that will be used to send form data.<br \/>\nSyntax:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">method = \"post\"\r\n<\/pre>\n<p><strong>3. enctype attribute:<\/strong> This attribute, using multipart as the value, will allow users to browse and upload multiple files.<br \/>\nSyntax:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">enctype = \"multipart\/form-data\r\n<\/pre>\n<p><strong>For Example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;html&gt;\r\n   &lt;head&gt;\r\n      &lt;title&gt;Uploading Form for file&lt;\/title&gt;\r\n   &lt;\/head&gt;\r\n  \r\n   &lt;body&gt;\r\n      &lt;h3&gt;File Upload:&lt;\/h3&gt;\r\n      Select a file to upload: &lt;br \/&gt;\r\n      &lt;form action = \"UploadForm\" method = \"post\"\r\n         enctype = \"multipart\/form-data\"&gt;\r\n         &lt;input type = \"file\" name = \"file\" size = \"100\" \/&gt;\r\n         &lt;br \/&gt;\r\n         &lt;input type = \"submit\" value = \"Upload File\" \/&gt;\r\n      &lt;\/form&gt;\r\n   &lt;\/body&gt;\r\n  \r\n&lt;\/html&gt;\r\n<\/pre>\n<p>Some points that need to be understood according to the code above are:<\/p>\n<ul>\n<li>The form method should always be POST. The GET method will not be valid here.<\/li>\n<li>The form action will contain the name of the JSP file that will support the backend working for the form.<\/li>\n<li>The enctype should be properly defined as multipart to browse multiple files<\/li>\n<li>To upload one file, you can use a single &lt;input..\/&gt; tag. To upload multiple files, include various input tags. The name of all input tags should have different values.<\/li>\n<li>The browser will generate a new browse button for each new file to be uploaded.<\/li>\n<\/ul>\n<p>What we created is just a frontend for uploading files. Now we will proceed towards writing the backend of this.<\/p>\n<h3>Writing the Backend<\/h3>\n<p>Firstly we need to define where the uploaded files will go. One can either set this up in program or it can be programmed in &lt;context-param&gt; of web.xml configuration as following:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;web-app&gt;\r\n....\r\n&lt;context-param&gt;\r\n   &lt;description&gt;Store uploaded file here&lt;\/description&gt;\r\n   &lt;param-name&gt;file-upload&lt;\/param-name&gt;\r\n   &lt;param-value&gt;\r\n      c:\\apache-tomcat-9.0.34\\webapps\\data\\\r\n   &lt;\/param-value&gt;\r\n&lt;\/context-param&gt;\r\n....\r\n&lt;\/web-app&gt;\r\n<\/pre>\n<p>Following is the JSP program of uploading the file.<\/p>\n<h3>UploadFile.jsp<\/h3>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">&lt;%@ page import = \"java.io.*,java.util.*, javax.servlet.*\" %&gt;\r\n&lt;%@ page import = \"javax.servlet.http.*\" %&gt;\r\n&lt;%@ page import = \"org.apache.commons.fileupload.*\" %&gt;\r\n&lt;%@ page import = \"org.apache.commons.fileupload.disk.*\" %&gt;\r\n&lt;%@ page import = \"org.apache.commons.fileupload.servlet.*\" %&gt;\r\n&lt;%@ page import = \"org.apache.commons.io.output.*\" %&gt;\r\n \r\n&lt;%\r\n   File file ;\r\n   int maxFileSize = 5000 * 1024;\r\n   int maxMemSize = 5000 * 1024;\r\n   ServletContext context = pageContext.getServletContext();\r\n   String filePath = context.getInitParameter(\"file-upload\");\r\n \r\n   \/\/ Verify the content type\r\n   String contentType = request.getContentType();\r\n  \r\n   if ((contentType.indexOf(\"multipart\/form-data\") &gt;= 0)) {\r\n  \tDiskFileItemFactory factory = new DiskFileItemFactory();\r\n  \t\/\/ maximum size stored in memory\r\n  \tfactory.setSizeThreshold(maxMemSize);\r\n  \t\r\n  \t\/\/ Location to save data that is larger than maxMemSize.\r\n  \tfactory.setRepository(new File(\"c:\\\\temp\"));\r\n \r\n  \t\/\/ Create a new file upload handler\r\n  \tServletFileUpload upload = new ServletFileUpload(factory);\r\n  \t\r\n  \t\/\/ maximum file size to be uploaded.\r\n  \tupload.setSizeMax( maxFileSize );\r\n  \t\r\n  \ttry {\r\n     \t\/\/ Parse the request to get file items.\r\n     \tList fileItems = upload.parseRequest(request);\r\n \r\n     \t\/\/ Process the uploaded file items\r\n     \tIterator i = fileItems.iterator();\r\n \r\n     \tout.println(\"&lt;html&gt;\");\r\n     \tout.println(\"&lt;head&gt;\");\r\n     \tout.println(\"&lt;title&gt;JSP File upload&lt;\/title&gt;\"); \r\n         out.println(\"&lt;\/head&gt;\");\r\n     \tout.println(\"&lt;body&gt;\");\r\n     \twhile ( i.hasNext () ) {\r\n        \tFileItem fi = (FileItem)i.next();\r\n        \tif ( !fi.isFormField () ) {\r\n           \t\/\/ Get the uploaded file parameters\r\n           \tString fieldName = fi.getFieldName();\r\n           \tString fileName = fi.getName();\r\n           \tboolean isInMemory = fi.isInMemory();\r\n           \tlong sizeInBytes = fi.getSize();\r\n        \t\r\n           \t\/\/ Write the file\r\n           \tif( fileName.lastIndexOf(\"\\\\\") &gt;= 0 ) {\r\n              \tfile = new File( filePath +\r\n              \tfileName.substring( fileName.lastIndexOf(\"\\\\\"))) ;\r\n           \t} else {\r\n              \tfile = new File( filePath +\r\n    \t          fileName.substring(fileName.lastIndexOf(\"\\\\\")+1)) ;\r\n           \t}\r\n           \tfi.write( file ) ;\r\n           \tout.println(\"Uploaded Filename: \" + filePath +\r\n           \tfileName + \"&lt;br&gt;\");\r\n        \t}\r\n     \t}\r\n     \tout.println(\"&lt;\/body&gt;\");\r\n         out.println(\"&lt;\/html&gt;\");\r\n  \t} catch(Exception ex) {\r\n     \tSystem.out.println(ex);\r\n  \t}\r\n   } else {\r\n  \tout.println(\"&lt;html&gt;\");\r\n  \tout.println(\"&lt;head&gt;\");\r\n  \tout.println(\"&lt;title&gt;Servlet upload&lt;\/title&gt;\"); \r\n  \tout.println(\"&lt;\/head&gt;\");\r\n  \tout.println(\"&lt;body&gt;\");\r\nout.println(\"&lt;p&gt;No file uploaded&lt;\/p&gt;\");\r\n  \tout.println(\"&lt;\/body&gt;\");\r\n  \tout.println(\"&lt;\/html&gt;\");\r\n   }\r\n%&gt;\r\n<\/pre>\n<p>Consider the following points before running the above code:<\/p>\n<ul>\n<li>Create directories c:\\temp and c:\\apache-tomcat5.5.29\\webapps\\data well in advance.<\/li>\n<li>Have the latest versions of commons-fileupload.x.x.jar and commons-io-x.x.jar.<\/li>\n<li>Upload a file that is less than max file size.<\/li>\n<\/ul>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-82033\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8.png\" alt=\"Uploading file in jsp\" width=\"1366\" height=\"189\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8.png 1366w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8-300x42.png 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8-1024x142.png 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8-150x21.png 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8-768x106.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/image1-8-520x72.png 520w\" sizes=\"auto, (max-width: 1366px) 100vw, 1366px\" \/><\/a><\/p>\n<p>When this program is run, the UploadFile.jsp is called, and the file browsed will add to the C:\\tomcat 9\\root\\webapps\\data as this is the path we have suggested. You can add any other location as you want on your pc.<\/p>\n<h2>Conclusion<\/h2>\n<p>In this article, we finally discussed how to do file uploading on the server in JSP. Hope you liked the article and it was useful to you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using the functionality of uploading a file, a user can upload multiple files at the server-side. HTML, along with JSP, is used for this. The file can be a text file, image, binary file,&#46;&#46;&#46;<\/p>\n","protected":false},"author":10,"featured_media":82031,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22403],"tags":[23232,23233],"class_list":["post-82028","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-jsp","tag-jsp-file-uploading","tag-upload-file-in-jsp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JSP File Uploading to the Server - DataFlair<\/title>\n<meta name=\"description\" content=\"JSP uploading file to the server in jsp with examples. Learn ways to upload file in JSP like using third party jar file and Servlet 3.0 API.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JSP File Uploading to the Server - DataFlair\" \/>\n<meta property=\"og:description\" content=\"JSP uploading file to the server in jsp with examples. Learn ways to upload file in JSP like using third party jar file and Servlet 3.0 API.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-09-10T03:30:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-08-25T08:17:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JSP File Uploading to the Server - DataFlair","description":"JSP uploading file to the server in jsp with examples. Learn ways to upload file in JSP like using third party jar file and Servlet 3.0 API.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/","og_locale":"en_US","og_type":"article","og_title":"JSP File Uploading to the Server - DataFlair","og_description":"JSP uploading file to the server in jsp with examples. Learn ways to upload file in JSP like using third party jar file and Servlet 3.0 API.","og_url":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2020-09-10T03:30:30+00:00","article_modified_time":"2021-08-25T08:17:12+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33"},"headline":"JSP File Uploading to the Server","datePublished":"2020-09-10T03:30:30+00:00","dateModified":"2021-08-25T08:17:12+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/"},"wordCount":496,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg","keywords":["jsp file uploading","upload file in jsp"],"articleSection":["JSP Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/","url":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/","name":"JSP File Uploading to the Server - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg","datePublished":"2020-09-10T03:30:30+00:00","dateModified":"2021-08-25T08:17:12+00:00","description":"JSP uploading file to the server in jsp with examples. Learn ways to upload file in JSP like using third party jar file and Servlet 3.0 API.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2020\/09\/JSP-File-Uploading.jpg","width":1200,"height":628,"caption":"JSP File Uploading"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/jsp-file-uploading\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"JSP Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/jsp\/"},{"@type":"ListItem","position":3,"name":"JSP File Uploading to the Server"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/a90b082e16aa38d207212d22b0581f33","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/dd6de0d647a0185cd6faf264e4ba860b0d85d08d7070766f9cd41bea5bb0b227?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"The DataFlair Team is passionate about delivering top-notch tutorials and resources on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. With expertise in the tech industry, we simplify complex topics to help learners excel. Stay updated with our latest insights.","url":"https:\/\/data-flair.training\/blogs\/author\/dfadteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82028","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=82028"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82028\/revisions"}],"predecessor-version":[{"id":82035,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/82028\/revisions\/82035"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/82031"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=82028"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=82028"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=82028"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}