Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to allow my users to upload files in admin panel, but I'm not sure where should I upload these files and how the script should look like?

<p>Please provide link to a file or click "Upload" to upload it from your PC:</p>
<form>
Link: <input type="text" name ="logo_url">
Upload: <input type="file" name="logo_file">
<input type="Submit" value="Upload">

How should back-end look for that script? I mean the type="file" part :)

Oh and of course I have fully working theme option page (so the first input works like a charm).

share|improve this question
    
add comment

2 Answers 2

up vote 1 down vote accepted

See this very similar question. The answer can be adjusted to work with all types of files, not just images.

share|improve this answer
add comment

If you use the Contact Form 7 plugin your visitors can upload an attachment to a file that sends you an email with the file as an attachment.

share|improve this answer
2  
Sorry, I don't use Contact Form, and I'm looking for an answer not connected to any plugin, I just want to understand the concept and then write my own php script. Thanks anyway. –  Wordpressor Jan 19 '11 at 12:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.