{"id":70457,"date":"2017-01-05T12:52:25","date_gmt":"2017-01-05T12:52:25","guid":{"rendered":"http:\/\/webkul.com\/blog\/?p=70457"},"modified":"2017-01-14T07:24:10","modified_gmt":"2017-01-14T07:24:10","slug":"create-files-programmatically-magento-2","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/","title":{"rendered":"Create Files Programmatically In Magento 2"},"content":{"rendered":"<p>This article demonstrate how to create\u00a0files like (image, pdf, xls, docx etc.) programmatically\u00a0in Magento 2.<\/p>\n<p>Steps to create files in Magento 2 are given below.<\/p>\n<div class=\"panel panel-primary\">\n<div class=\"panel-heading\">\n<div>\n<h3 class=\"panel-title\">STEP 1 : Content of File<\/h3>\n<\/div>\n<\/div>\n<div class=\"panel-body\">\n<div>\n<pre class=\"brush:php\">$url = \"https:\/\/webkul.com\/wp-content\/themes\/webkul\/inc\/E-Commerce-Marketplace-Use-Case.pdf\";\r\n$pdfContent = file_get_contents($url);\r\n<\/pre>\n<ul>\n<li><strong>file_get_contents(<span style=\"color: #999999\">_path<\/span>) :\u00a0<\/strong>In php this is best and preferred way to read complete file into string\n<ul>\n<li><strong>Parameters:<\/strong>\n<ul>\n<li><strong><span style=\"color: #999999\">_path<\/span> :\u00a0<\/strong>File path which need to read.<\/li>\n<li><strong><span style=\"color: #999999\">offset<\/span> : <\/strong>Specify position from where file reading starts.<\/li>\n<li><span style=\"color: #999999\"><strong>maxlen<\/strong><\/span><strong>\u00a0: <\/strong>Define length of data which need to read. By default it read complete data.<strong>\u00a0<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"panel panel-primary\">\n<div class=\"panel-heading\">\n<div>\n<h3 class=\"panel-title\">STEP 2\u00a0: Check directory and Create\u00a0Directory<\/h3>\n<\/div>\n<\/div>\n<div class=\"panel-body\">\n<div>\n<pre class=\"brush:php\">$filePath = \"\/webkul\/attachment\/file\/pdf\/\";\r\n$pdfPath = $this-&gt;_directoryList-&gt;getPath('media').$filePath;\r\nif (!is_dir($pdfPath)) {\r\n$ioAdapter = $this-&gt;_file;\r\n$ioAdapter-&gt;mkdir($pdfPath, 0775);\r\n}<\/pre>\n<ul>\n<li><strong>_directoryList :\u00a0<\/strong>Is an object of &#8220;<span style=\"color: #008000\">Magento\\Framework\\App\\Filesystem\\DirectoryList<\/span>&#8221; class.<\/li>\n<li><strong>getPath(<span style=\"color: #999999\">directory_type<\/span>) : <\/strong>It returns\u00a0path of desired directory type.<\/li>\n<li><strong>is_dir(<span style=\"color: #999999\">directory_path<\/span>) :\u00a0<\/strong>Check for directory and return <strong>True<\/strong>\u00a0if directory exist.<\/li>\n<li><strong>_file :\u00a0<\/strong>Is an object of &#8220;<span style=\"color: #008000\">Magento\\Framework\\Filesystem\\Io\\File<\/span>&#8221; class.<\/li>\n<li><strong>mkdir(<span style=\"color: #999999\">directory_path<\/span>, \u00a0<span style=\"color: #999999\">directory_permission<\/span>) :\u00a0<\/strong>Create directory of given path,\n<ul>\n<li><strong>Parameters:<\/strong>\n<ul>\n<li><strong><span style=\"color: #808080\">directory_path :<\/span><\/strong>\u00a0Path of directory (&#8220;<span style=\"color: #008000\">\/webkul\/attachment\/file\/pdf<\/span>&#8220;)<\/li>\n<li><span style=\"color: #808080\"><strong>directory_permission :\u00a0<\/strong><span style=\"color: #333333\">File permission as per as requirement (<span style=\"color: #3366ff\">0644<\/span>).<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"panel panel-primary\">\n<div class=\"panel-heading\">\n<div>\n<h3 class=\"panel-title\">step 3 : Create File Using File Content<\/h3>\n<\/div>\n<\/div>\n<div class=\"panel-body\">\n<div>\n<pre class=\"brush:php\">$fileName = \"webkul.pdf\";\r\n$ioAdapter-&gt;open(array('path'=&gt;$pdfPath));\r\n$ioAdapter-&gt;write($fileName, $pdfContent, 0666);<\/pre>\n<ul>\n<li><strong>open : <\/strong>Helps to open given path where file need to create.<\/li>\n<li><strong>write(<span style=\"color: #999999\">_fileName<\/span>, <span style=\"color: #999999\">_fileContent<\/span>, <span style=\"color: #999999\">_filePermission<\/span>) : \u00a0<\/strong>Create file inside given path.\n<ul>\n<li><strong>Parameters :<\/strong>\n<ul>\n<li><strong><span style=\"color: #999999\">_filename :\u00a0<\/span><\/strong><span style=\"color: #333333\">Specify file name<\/span><\/li>\n<li><span style=\"color: #999999\"><strong>_filecontent :<\/strong><\/span>\u00a0Content of file which need to create<\/li>\n<li><span style=\"color: #999999\"><strong>_filePermission<\/strong> :<\/span>\u00a0Permission of file which need to assign as per as requirement.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article demonstrate how to create\u00a0files like (image, pdf, xls, docx etc.) programmatically\u00a0in Magento 2. Steps to create files in Magento 2 are given below. STEP 1 : Content of File $url = &#8220;https:\/\/webkul.com\/wp-content\/themes\/webkul\/inc\/E-Commerce-Marketplace-Use-Case.pdf&#8221;; $pdfContent = file_get_contents($url); file_get_contents(_path) :\u00a0In php this is best and preferred way to read complete file into string Parameters: _path :\u00a0File <a href=\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":90,"featured_media":46784,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,302,13,1],"tags":[82,2460,4301],"class_list":["post-70457","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-magento","category-magento2","category-php","category-uncategorized","tag-create-files","tag-magento-2","tag-programmatically"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Create Files and Directories Programmatically In Magento 2<\/title>\n<meta name=\"description\" content=\"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create Files and Directories Programmatically In Magento 2\" \/>\n<meta property=\"og:description\" content=\"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-01-05T12:52:25+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-14T07:24:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashish Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashish Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\"},\"author\":{\"name\":\"Ashish Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d\"},\"headline\":\"Create Files Programmatically In Magento 2\",\"datePublished\":\"2017-01-05T12:52:25+00:00\",\"dateModified\":\"2017-01-14T07:24:10+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\"},\"wordCount\":214,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png\",\"keywords\":[\"create files\",\"Magento 2\",\"Programmatically\"],\"articleSection\":[\"magento\",\"Magento2\",\"php\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\",\"url\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\",\"name\":\"Create Files and Directories Programmatically In Magento 2\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png\",\"datePublished\":\"2017-01-05T12:52:25+00:00\",\"dateModified\":\"2017-01-14T07:24:10+00:00\",\"description\":\"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Files Programmatically In Magento 2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d\",\"name\":\"Ashish Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ashish Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/ashish067\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Create Files and Directories Programmatically In Magento 2","description":"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.","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:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/","og_locale":"en_US","og_type":"article","og_title":"Create Files and Directories Programmatically In Magento 2","og_description":"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.","og_url":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-01-05T12:52:25+00:00","article_modified_time":"2017-01-14T07:24:10+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png","type":"image\/png"}],"author":"Ashish Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ashish Singh","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/"},"author":{"name":"Ashish Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d"},"headline":"Create Files Programmatically In Magento 2","datePublished":"2017-01-05T12:52:25+00:00","dateModified":"2017-01-14T07:24:10+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/"},"wordCount":214,"commentCount":1,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png","keywords":["create files","Magento 2","Programmatically"],"articleSection":["magento","Magento2","php"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/","url":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/","name":"Create Files and Directories Programmatically In Magento 2","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png","datePublished":"2017-01-05T12:52:25+00:00","dateModified":"2017-01-14T07:24:10+00:00","description":"This article demonstrate how to create files like (image, pdf, xls, docx etc.) as well as directories programmatically in Magento 2.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Magneto-Code-Snippet-5.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/create-files-programmatically-magento-2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create Files Programmatically In Magento 2"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d","name":"Ashish Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ashish Singh"},"url":"https:\/\/webkul.com\/blog\/author\/ashish067\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70457","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=70457"}],"version-history":[{"count":13,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70457\/revisions"}],"predecessor-version":[{"id":71552,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/70457\/revisions\/71552"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/46784"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=70457"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=70457"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=70457"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}