[wp-hackers] Uploading image attachments from the front-end

Jörn Röder kontakt at joernroeder.de
Mon Nov 16 17:59:07 UTC 2009


Hi,
Have a look at the tdo Mini Form Plugin. It have an Image-Uploader  
witch allows you to upload stuff from the Front-End…

http://thedeadone.net/download/tdo-mini-forms-wordpress-plugin/

Jörn


Am 12.11.2009 um 21:40 schrieb Dion Hulse (dd32):

> On Fri, 13 Nov 2009 05:28:54 +1100, Matthew Gerring  
> <mgerring at emrl.com> wrote:
>
>> I figured that out- media_sideload_image() handles the upload and
>> creates a fake $_FILES-like array from a remote URL. You can pass a
>> regular $_FILES array to media_handle_sideload() along with the post
>> ID and it handles all of the attachment, meta, mimetype, thumbnail
>> generation, and etc.
>>
>> I had to require /wp-admin/includes/admin.php to have access to all  
>> of
>> the functions I needed- is this the best way to do it?
>
> Unfortunately, Yes. As the media management functions are held within.
> You might get away with just using wp-admin/includes/media.php and  
> file.php..
> -- 
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers



More information about the wp-hackers mailing list