• Not sure if this is an easy thing or not. I want to keep my files organized using WP’s media manager, but upload them via FTP to wp-content/uploads folder (for example if I have lots of files or some very large ones).

    Is this possible? I’ve used other software that can scan a folder for changes and new files and update itself.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I do not think this is possible. I am looking through the WP code to find out how and where media metadata is stored (its not obvious from the DB schema), but my belief is that without the presence of such metadata (added when you upload the media using the WP uploader), the media won’t show up in the media manager.

    Here’s what the docs say:
    https://codex.www.ads-software.com/Media_Library_SubPanel

    If you do need to upload Media, even if that Media is not related to a Post or Page, then you need to use the Media Add New SubPanel.

    There are some plugins that attempt to present media from certain external sites (e.g: Flickr?) within the Media Manager. And there is one plugin that helps you incorporate independently uploaded files into the media manager, but the action is not automatic.

    One more thing: it is possible to upload in a manner recognised by the Media Manager without using it. This can be done using the WordPress XML-RPC interface. For example, the WordPress::API::MediaObject Perl Module wraps all the XML-RPC making it possible to easily write a script that performs an upload and spits you back a URL:

    use WordPress::API::MediaObject;
    ...
    ...
    my $wp = WordPress::API::MediaObject->new({
                    proxy => 'https://blog.example.org/xmlrpc.php',
                    username => 'mylogin',
                    password => 'somepass',
                });
    
    $wp->load_file("xyz.jpg");
    $wp->upload();
    print $wp->url();

    On my Mac, I have a (as yet incomplete) droplet that lets me drag/drop multiple files onto it and then uploads them to my WP media manager.

    This won’t help if you want to use FTP or cannot wrap a UI/GUI around such code, of course.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can media manager recgognize files uploaded via FTP?’ is closed to new replies.