[wp-trac] [WordPress Trac] #45562: drag and drop file upload fails with empty files when dragging from macOS Preview into WP on Safari 12
WordPress Trac
noreply at wordpress.org
Mon Dec 10 00:49:16 UTC 2018
#45562: drag and drop file upload fails with empty files when dragging from macOS
Preview into WP on Safari 12
--------------------------+------------------------------
Reporter: dbcarlton | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Media | Version: 5.0
Severity: normal | Resolution:
Keywords: | Focuses:
--------------------------+------------------------------
Old description:
> Part of my workflow involves opening multiple files in Preview (on
> macOS), and then adding them to WordPress by dragging and dropping them
> to the Add Media page in WordPress (running in Safari). That used to
> work fine, but when I upgraded to Safari 12.0, I get the error:
>
> "File is empty. Please upload something more substantial. This error
> could also be caused by uploads being disabled in your php.ini or by
> post_max_size being defined as smaller than upload_max_filesize in
> php.ini."
>
> I'm using self-hosted WordPress (on both Ubuntu 11.04 or 11.10, with
> Apache 2.4 as the web server); I don't think I made any server-side
> configuration changes when this started happening, though it's possible I
> upgraded Apache versions at about the same time? This occurs in
> WordPress 5.0, and also occurred in WP 4.x versions; again, I don't think
> it was caused by a WP change, though I can't rule out a WP upgrade at
> about the same time.
>
> This works fine when dragging and dropping from Finder, it's only when
> dragging and dropping from Preview.
>
> To reproduce:
>
> * Select multiple images and open them up in Preview.
> * Go to Add Media in Wordpress in Safari 12.
> * Drag one of the images from the Preview sidebar to Wordpress.
>
> I get the above file upload error when I do this.
New description:
Part of my workflow involves opening multiple files in Preview (on macOS),
and then adding them to WordPress by dragging and dropping them to the Add
Media page in WordPress (running in Safari). That used to work fine, but
when I upgraded to Safari 12.0, I get the error:
"File is empty. Please upload something more substantial. This error could
also be caused by uploads being disabled in your php.ini or by
post_max_size being defined as smaller than upload_max_filesize in
php.ini."
I'm using self-hosted WordPress (on both Ubuntu 11.04 or 11.10, with
Apache 2.4 as the web server); I don't think I made any server-side
configuration changes when this started happening, though it's possible I
upgraded Apache versions at about the same time? This occurs in WordPress
5.0, and also occurred in WP 4.x versions; again, I don't think it was
caused by a WP change, though I can't rule out a WP upgrade at about the
same time.
This works fine when dragging and dropping from Finder, it's only when
dragging and dropping from Preview.
To reproduce:
* Select multiple images and open them up in Preview.
* Go to Add Media in WordPress in Safari 12.
* Drag one of the images from the Preview sidebar to Wordpress.
I get the above file upload error when I do this.
--
Comment (by johnjamesjacoby):
I’ve also seen this, but I think it’s possible this is actually bug in
macOS Mojave.
I suspect Safari is seeing the thumbnail as the upload, and not the
original file that the thumbnail represents.
Because thumbnails are cached in user directories with permissions
restrictions, Safari basically is the drop-target of a zero-byte file.
It’s definitely weird, whether my theory is right or wrong.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45562#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list