WordPress.org

Ready to get started?Download WordPress

Forums

Can media manager recgognize files uploaded via FTP? (3 posts)

  1. nocabt
    Member
    Posted 5 years ago #

    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!

  2. ravisarma
    Member
    Posted 5 years ago #

    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:
    http://codex.wordpress.org/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.

  3. ravisarma
    Member
    Posted 5 years ago #

    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 => 'http://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.

Topic Closed

This topic has been closed to new replies.

About this Topic