{"id":4376,"date":"2014-01-31T22:07:03","date_gmt":"2014-02-01T06:07:03","guid":{"rendered":"http:\/\/g-liu.com\/blog\/?p=4376"},"modified":"2014-01-31T22:13:15","modified_gmt":"2014-02-01T06:13:15","slug":"no-drag-and-drop-file-upload-no-problem","status":"publish","type":"post","link":"https:\/\/g-liu.com\/blog\/2014\/01\/no-drag-and-drop-file-upload-no-problem\/","title":{"rendered":"No drag-and-drop file upload? No problem!"},"content":{"rendered":"<p>With the rapid development new web technologies, <a href=\"http:\/\/html5demos.com\/dnd-upload\" target=\"_blank\">drag-and-drop file uploading<\/a> seems to be the new norm. No more clicking &#8220;Upload&#8221; and having to navigate through a maze of folders. Just drag the file from an open window on your computer and voila, ready for upload.<\/p>\n<p>Unfortunately, some older sites don&#8217;t have this feature. Most modern browsers, however, do have this. That means you can make drag-and-drop file upload work on virtually <em>any<\/em> site.<br \/>\n<!--more--><br \/>\nWhen you see a &#8220;Choose Files&#8221;, &#8220;Upload&#8221;, &#8220;Select files&#8221;, or similar button on a website&#8230;<\/p>\n<p><a href=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4377\" data-permalink=\"https:\/\/g-liu.com\/blog\/2014\/01\/no-drag-and-drop-file-upload-no-problem\/upload-button-example\/\" data-orig-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example.png\" data-orig-size=\"380,40\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"upload-button-example\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example-300x31.png\" data-large-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example.png\" class=\"alignnone size-full wp-image-4377\" alt=\"upload-button-example\" src=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example.png\" width=\"380\" height=\"40\" srcset=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example.png 380w, https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/upload-button-example-300x31.png 300w\" sizes=\"(max-width: 380px) 100vw, 380px\" \/><\/a><\/p>\n<p>simply take a file on your computer, and drag it right over the button.<\/p>\n<p><a href=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"4378\" data-permalink=\"https:\/\/g-liu.com\/blog\/2014\/01\/no-drag-and-drop-file-upload-no-problem\/copy-drag-and-drop\/\" data-orig-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png\" data-orig-size=\"329,172\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"copy-drag-and-drop\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop-300x156.png\" data-large-file=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png\" class=\"alignnone  wp-image-4378\" alt=\"copy-drag-and-drop\" src=\"http:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png\" width=\"329\" height=\"172\" srcset=\"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png 329w, https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop-300x156.png 300w\" sizes=\"(max-width: 329px) 100vw, 329px\" \/><\/a><\/p>\n<p>Release your mouse button, and there you go. Files = ready for upload.<\/p>\n<p>For sites that support multiple file upload,\u00a0this approach works equally well\u00a0by selecting multiple files (Shift, Control\u00a0+ Click).<\/p>\n<p>I have tested this in\u00a0Firefox, Chrome, and Opera, all of which support native drag-and-drop. Sadly, this feature\u00a0does not work in IE.<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content --><!-- AddThis Related Posts generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>With the rapid development new web technologies, drag-and-drop file uploading seems to be the new norm. No more clicking &#8220;Upload&#8221; and having to navigate through a maze of folders. Just drag the file from an open window on your computer and voila, ready for upload. Unfortunately, some older sites don&#8217;t have this feature. Most modern browsers, however, do have this. &#8230;<!-- AddThis Advanced Settings generic via filter on wp_trim_excerpt --><!-- AddThis Share Buttons generic via filter on wp_trim_excerpt --><!-- AddThis Related Posts generic via filter on wp_trim_excerpt --><\/p>\n","protected":false},"author":2,"featured_media":4378,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[115],"tags":[],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/g-liu.com\/blog\/wp-content\/uploads\/2014\/01\/copy-drag-and-drop.png","jetpack_shortlink":"https:\/\/wp.me\/p2Zt3y-18A","_links":{"self":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/4376"}],"collection":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/comments?post=4376"}],"version-history":[{"count":3,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/4376\/revisions"}],"predecessor-version":[{"id":4381,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/posts\/4376\/revisions\/4381"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media\/4378"}],"wp:attachment":[{"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/media?parent=4376"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/categories?post=4376"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g-liu.com\/blog\/wp-json\/wp\/v2\/tags?post=4376"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}