[wp-hackers] Uploading Files with a Plugin
ionfish at gmail.com
Tue Feb 10 09:35:20 GMT 2009
What's wrong with just using get_option('upload_path'); ? It doesn't
need to be appended to ABSPATH, as it's based on the WP_CONTENT_DIR
constant; that's why you're getting those paths, because it's
appending one absolute filesystem path to another.
2009/2/10 Mohammed K. al-Safi <msafi at msafi.com>:
> 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: *
> 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
> 50% thanks in advance.
> Mohammed al-Safi
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers