[wp-hackers] Uploading Files with a Plugin

Mohammed K. al-Safi msafi at msafi.com
Tue Feb 10 05:25:22 GMT 2009


Hi,

I'm trying to allow users to upload a CSV file through a plugin, take that
CSV file and parse its content into the database. I can't figure out how to
get the plugin to manage the file upload. I think the only folder which the
plugin has permission to upload to is the upload folder that is specified in
the settings. I tried to use *ABSPATH.get_option('upload_path'); *to get the
location of that folder, but this is returning something funny like: *
C:\xampp\htdocs\wordpress/C:\xampp\htdocs\wordpress/wp-content/uploads*(local
WordPress installation using XAMPP).

Anyone know what's happening here and how to get the upload path correctly?

Alternatively, if you know of an up-to-date plugin that accepts user uploads
and does something with them, I could perhaps just take a look at their
code...

50% thanks in advance.

Best,

Mohammed al-Safi


More information about the wp-hackers mailing list