WordPress.org

Ready to get started?Download WordPress

Forums

Image upload via external script (11 posts)

  1. bekar09
    Member
    Posted 5 years ago #

    Hi everybody,

    I want to write a php script in which I can dynamically upload images into the filesystem based on the default folder structure there in WordPress. For this, what are the necessary wordpress functions i should use to get an attachment_id after image upload?

    tnx.

  2. ucfknight10
    Member
    Posted 5 years ago #

    i am interested i this too. to simplify usage for a client i am writing a plugin, and i would like to be able to upload images from the plugin page to an already existing page via page id.

  3. bekar09
    Member
    Posted 5 years ago #

    please update on the same once you're done or have you already written the plugin? can we insert multiple images(a gallery) to a particular post? also an image upload plugin through image url's would be a nice idea.

  4. ucfknight10
    Member
    Posted 5 years ago #

    i havent figured it out; i was expressing an interest in this topic. i would like to allow for wordpress media upload through a plugin i am writing.

  5. xinfo
    Member
    Posted 5 years ago #

    you can able to upload images using external script but you can't able to call the image using database since images are based on post date

  6. ucfknight10
    Member
    Posted 5 years ago #

    you can upload images via the media library; this bypasses the post/page date, but still files the image based on the current date. all i (and i believe bekar) are wanting is a function to write and/or call that will allow us to use the wordpress media upload in a plugin or a template file.

  7. xinfo
    Member
    Posted 5 years ago #

    @ ucfknight10

    this is wat i said you call image but it won't be much flexible if it's uploaded via external script .i work to do this for more than 1 month when i completed i find it's so hard and complicated when you need to for recent post ,popular post,random post etc

  8. ucfknight10
    Member
    Posted 5 years ago #

    could you possibly post the code or w/e you did so i could look at it? maybe it'll spark a thought in my mind to get me started.

  9. bekar09
    Member
    Posted 5 years ago #

    any updates on this?

  10. ucfknight10
    Member
    Posted 5 years ago #

    bump

  11. hikerjoe
    Member
    Posted 4 years ago #

    I think I'm trying to figure out the same problem. I'm writing a plug-in that allows a user to upload an image to be associated with a custom data type.

    I would like make use of the Media Uploader in my admin page in the same way that it works on the Post or Page write pages when you click on one of the icons in the "Upload/Insert" menu.

    The problem I have is in being able to insert/associate the chosen image with the data type created by my custom admin page. Has anyone been able to figure this out?

Topic Closed

This topic has been closed to new replies.

About this Topic