• NettSite

    (@nettsite)


    I would like to enable a user to upload a file which should be stored in some convenient place on the server, e.g. “wp-content/uploads” with the file name, and/or the url to the file, stored as an option or options in the wp_options table.

    Problem is that WP seems to do “stuff” to the $_FILES array, so that it is not available by the time the function which saves the option values for the plugin is called.

    Does anyone have any experience in this area, or suggestions for me?

Viewing 1 replies (of 1 total)
  • Thread Starter NettSite

    (@nettsite)

    I have confused myself here:

    I have extended the post form using a plugin so that I can add items to the wp_postmeta table – I am using the post as a description for a product, and adding price, etc as additional data items.

    All of this works perfectly, except for a file upload item, which I need to add – e.g. if the “product” is a PDF file.

    By the time the post is saved, $_FILES is an empty array.

Viewing 1 replies (of 1 total)

The topic ‘Uploading files for use in a plugin’ is closed to new replies.