Using this plugin to upload files other than images (like videos or pdf), files will end up with no extension in the Media Library.
To fix this, change /wp-content/plugins/external-media-upload/index.php
Old:
if( ! isset( $path['extension'] ) ){
$tmpnew = $tmp . '.tmp';
$file_array['tmp_name'] = $tmpnew;
} else {
$file_array['tmp_name'] = $tmp;
}
$name = pathinfo( $url, PATHINFO_FILENAME ) . $fileextension;
New:
if( ! isset( $path['extension'] ) ){
$tmpnew = $tmp . '.tmp';
$file_array['tmp_name'] = $tmpnew;
} else {
$file_array['tmp_name'] = $tmp;
}
// Use file extension directly from URL
if ( empty( $fileextension ) )
{
$path = parse_url( $url );
$pathInfo = pathinfo( $path[ 'path' ] );
$fileextension = '.' . $pathInfo[ 'extension' ];
}
$name = pathinfo( $url, PATHINFO_FILENAME ) . $fileextension;
]]>
I installed the plugin, I have everything set with credentials on the google side, however when i attempt to use the plugin to add media from google drive, I get the “App not verified” screen right after the account selection step of the oAuth process. If I click “advanced” and continue on, it does in fact connect to my google drive account, but I cannot have other site admins go through the unsecure process. Is there a fix for this?
]]>Files (images, jpeg) from google drive are uploaded in media library with no error, but file size is always 1KB.
]]>The screenshot is from the plugin page on WP.org.
The upper section doesn’t appear on my fresh installation of WP, although the horizontal bar and Timeout section do appear.
]]>We also can’t upload from a URL that points to a local file, although we can access that file via a URL in a browser — for example, “C:/a/test.txt” or “file:///C:/a/test.txt”.
Ravi, could you look into these three issues, please?
* Large files fail, or take forever
* No progress indicator
* No local file support
Thank you, sir.
]]>Hello
Unable to upload a zip file and can not be displayed after transferring the contents of the file
File extension changes
Please check
Thanks
]]>Hi,
I recently noticed that some of my uploaded pdfs were zero bytes, when in the interface pdf embedder plugin showed the message “stream must have data”. I finally nailed down that this was happening on upload with your plugin. I proved this out by being able to upload the same pdfs via normal media library “upload new media”. Same files, no more zero bytes. The question is why. Was it something specific to these pdfs? It wouldn’t seem so as it also happened to some wma audio files. What is it ohly happening when a huge number of pdfs were attempted to upload at once? That doesn’t seem right because one group of 6 did not upload correctly, but another batch of much more did, many times.
Given this, I’m not positive it has anything to do with your plugin but thought I should report it in case you have heard of other instances of this happening. If you are aware of it, please let me know, because as of now, each time this is observed, I need to stop and upload them individually using normal media library functionality.
Thx.
]]>Hello,
Your plugin is exactely what I needed, and works very well.
But I have a feature request : are you able to include a field directly in the “Upload Image” tab? Look at the screenshot, it’s in this windows : https://brinidesigner.com/wp-content/uploads/2014/12/wordpress-new-media-uploader.jpg
The reason for it is I’m using Custom Upload Dir plugin, which generates physically different folders for the new uploaded files, regarding the post type. The thing is, if I use yuour plugin, the uploaded images will not be attached to any post, and then Custom Upload Dir will define the root of my upload folder.
That’s why, by adding a field “external url” directly in the upload image tab, both plugin will work as expected. This will be possible for a single link at a time in my opinion, not for several links in a single submission… but this will be so valuable.
Regards.
]]>