[wp-hackers] Uploading Files with a Plugin
Mohammed K. al-Safi
msafi at msafi.com
Tue Feb 10 10:09:10 GMT 2009
Yep, that worked!
Full thanks to you, Benedict!
On Tue, Feb 10, 2009 at 1:35 PM, Benedict Eastaugh <ionfish at gmail.com>wrote:
> 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>:
> > Hi,
> > I'm trying to allow users to upload a CSV file through a plugin, take
> > CSV file and parse its content into the database. I can't figure out how
> > get the plugin to manage the file upload. I think the only folder which
> > plugin has permission to upload to is the upload folder that is specified
> > the settings. I tried to use *ABSPATH.get_option('upload_path'); *to get
> > 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
> > Alternatively, if you know of an up-to-date plugin that accepts user
> > and does something with them, I could perhaps just take a look at their
> > code...
> > 50% thanks in advance.
> > Best,
> > Mohammed al-Safi
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hackers at lists.automattic.com
> > http://lists.automattic.com/mailman/listinfo/wp-hackers
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers