-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sideload images not working #5
Comments
@mattheu can you link me to where WordPress makes use on |
Found it in https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/file.php#L336, I think I'll open a trac ticket to see what is said |
Cool keep me updated. Keen to come up with a workaround if you can think of anything. |
@mattheu seems this has changed a bit in trunk, see https://core.trac.wordpress.org/changeset/29209, though judging by that code, it should be passing this check: https://github.com/WordPress/WordPress/blob/master/wp-admin/includes/file.php#L321 /*
* A writable uploads dir will pass this test. Again, there's no point
* overriding this one.
*/
if ( ! ( ( $uploads = wp_upload_dir( $time ) ) && false === $uploads['error'] ) ) {
return call_user_func( $upload_error_handler, $file, $uploads['error'] );
} I wonder why that's failing? |
Oh crap that, was doing the opposite that I was thinking... |
Created https://core.trac.wordpress.org/ticket/29257, will see what response I get |
I created a workaround for this which was committed to the plugin for some time. |
As used by press this - but I've also been using it to import images when given just the src,
Problem is that it creates a temp file and then moves it to uploads using phps
rename
Function so you get a notice telling you the file could not be movedThe text was updated successfully, but these errors were encountered: