{"id":236,"date":"2006-03-18T09:58:03","date_gmt":"2006-03-18T09:58:03","guid":{"rendered":"https:\/\/dev.masterbootrecord.de\/?p=236"},"modified":"2006-03-18T09:58:03","modified_gmt":"2006-03-18T09:58:03","slug":"ajax-php-file-upload-progress-bar","status":"publish","type":"post","link":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/","title":{"rendered":"AJAX PHP File Upload Progress Bar"},"content":{"rendered":"<p>&#8222;One of the few things that I find lacking in PHP is the ability to report the progress of a file upload. This means that file uploads, especially uploads of larger files, can be extremely frustrating for end users when they don&#8217;t know if the upload is progressing or if it has stalled or if it has even started. There are two ways around this. One is to patch PHP, Pdoru provides such a patch. Not everyone can patch PHP though. You can&#8217;t use a patch if you&#8217;re on a shared server, if you want to use ready-made binaries, if you don&#8217;t want to risk stability by using a patch or if you just don&#8217;t want to have to remember to apply the patch again every time you upgrade PHP. The other option is to use a perl script to receive the file when it&#8217;s uploaded. This is the approach used by MegaUpload. MegaUpload is what I have based my solution on, but I have added asynchronous file upload support and an AJAX upload progress bar, instead of the refreshing popup used by MegaUpload.&#8220;<\/p>\n<p><a href=\"http:\/\/tomas.epineer.se\/archives\/3\" target=\"_blank\" rel=\"noopener\">AJAX PHP File Upload Progress Bar<\/a><\/p>\n<p><a href=\"http:\/\/tomas.epineer.se\/archives\/3\">AJAX PHP File Upload Progress Bar<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8222;One of the few things that I find lacking in PHP is the ability to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[25,29,26],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","tag-ajax","tag-php","tag-webdevelopment"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AJAX PHP File Upload Progress Bar - MasterBootRecord.de<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AJAX PHP File Upload Progress Bar - MasterBootRecord.de\" \/>\n<meta property=\"og:description\" content=\"&#8222;One of the few things that I find lacking in PHP is the ability to...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/\" \/>\n<meta property=\"og:site_name\" content=\"MasterBootRecord.de\" \/>\n<meta property=\"article:published_time\" content=\"2006-03-18T09:58:03+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\u00a0Minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/#\\\/schema\\\/person\\\/37c6e75182eb3162fb788d261f4b00e6\"},\"headline\":\"AJAX PHP File Upload Progress Bar\",\"datePublished\":\"2006-03-18T09:58:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/\"},\"wordCount\":208,\"commentCount\":2,\"keywords\":[\"ajax\",\"php\",\"Webdevelopment\"],\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/\",\"url\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/\",\"name\":\"AJAX PHP File Upload Progress Bar - MasterBootRecord.de\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/#website\"},\"datePublished\":\"2006-03-18T09:58:03+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/#\\\/schema\\\/person\\\/37c6e75182eb3162fb788d261f4b00e6\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/ajax-php-file-upload-progress-bar\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/masterbootrecord.de\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AJAX PHP File Upload Progress Bar\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/#website\",\"url\":\"https:\\\/\\\/masterbootrecord.de\\\/\",\"name\":\"MasterBootRecord.de\",\"description\":\"Online since 2001\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/masterbootrecord.de\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/masterbootrecord.de\\\/#\\\/schema\\\/person\\\/37c6e75182eb3162fb788d261f4b00e6\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/masterbootrecord.de\"],\"url\":\"https:\\\/\\\/masterbootrecord.de\\\/author\\\/tscherno\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AJAX PHP File Upload Progress Bar - MasterBootRecord.de","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:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/","og_locale":"de_DE","og_type":"article","og_title":"AJAX PHP File Upload Progress Bar - MasterBootRecord.de","og_description":"&#8222;One of the few things that I find lacking in PHP is the ability to...","og_url":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/","og_site_name":"MasterBootRecord.de","article_published_time":"2006-03-18T09:58:03+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"admin","Gesch\u00e4tzte Lesezeit":"1\u00a0Minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/#article","isPartOf":{"@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/"},"author":{"name":"admin","@id":"https:\/\/masterbootrecord.de\/#\/schema\/person\/37c6e75182eb3162fb788d261f4b00e6"},"headline":"AJAX PHP File Upload Progress Bar","datePublished":"2006-03-18T09:58:03+00:00","mainEntityOfPage":{"@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/"},"wordCount":208,"commentCount":2,"keywords":["ajax","php","Webdevelopment"],"inLanguage":"de","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/","url":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/","name":"AJAX PHP File Upload Progress Bar - MasterBootRecord.de","isPartOf":{"@id":"https:\/\/masterbootrecord.de\/#website"},"datePublished":"2006-03-18T09:58:03+00:00","author":{"@id":"https:\/\/masterbootrecord.de\/#\/schema\/person\/37c6e75182eb3162fb788d261f4b00e6"},"breadcrumb":{"@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/masterbootrecord.de\/ajax-php-file-upload-progress-bar\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/masterbootrecord.de\/"},{"@type":"ListItem","position":2,"name":"AJAX PHP File Upload Progress Bar"}]},{"@type":"WebSite","@id":"https:\/\/masterbootrecord.de\/#website","url":"https:\/\/masterbootrecord.de\/","name":"MasterBootRecord.de","description":"Online since 2001","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/masterbootrecord.de\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Person","@id":"https:\/\/masterbootrecord.de\/#\/schema\/person\/37c6e75182eb3162fb788d261f4b00e6","name":"admin","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/secure.gravatar.com\/avatar\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a1e3eec1ed5f414f0e2d671a647ef408837fe6ea708b92c6e94b3cec1b86bbdc?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/masterbootrecord.de"],"url":"https:\/\/masterbootrecord.de\/author\/tscherno\/"}]}},"_links":{"self":[{"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":0,"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"wp:attachment":[{"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/masterbootrecord.de\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}