[resolved] Fetch a remote media-file and store it the way WP does (3 posts)

  1. Stefano Garuti
    Posted 8 years ago #

    I'm writing a plugin for a client and I need to:
    1) fetch a remote media (could be a jpeg or a swf flash) from another server
    2) store it in the uploads WP folders
    3)add it to the Media Gallery so the user than can use it in his own post and pages.

    I would like to use standard WP functions or at least classes already included in the WP distribution.

    for 3) already found the functions in the codex.

    For 1) I'm thinking using the Snoopy class to fetch the file from the remote server.
    Question: where can I see an example of Snoopy's use within the WP core?

    For 2) I would like that the plugin obey to the WP option and setting when it save the fetched file: the upload path and month-year folder structure.
    Question: where can I found the function that deal with the "save media" task and how can I take advantage of it?


  2. Stefano Garuti
    Posted 8 years ago #

    Nevermind, I think I found what I was looking for:


  3. galaxy001
    Posted 7 years ago #

    Any news on this plugin ?

    I am seaching for a plugin to do just the same thing and I found this. So what is the progress ?

Topic Closed

This topic has been closed to new replies.

About this Topic