<input type="file"> change where file gets uploaded?

M

Mark

Hi,

So, from my understanding, when you use <input type="file"> your file
gets uploaded to some temporary folder...

But is there a way to change where it gets uploaded?

On my web server, all sites share the same temp folder..so I want to it
to upload somewhere on *my* site.


Thanks
 
L

Leif K-Brooks

Mark said:
So, from my understanding, when you use <input type="file"> your file
gets uploaded to some temporary folder...

But is there a way to change where it gets uploaded?

On my web server, all sites share the same temp folder..so I want to it
to upload somewhere on *my* site.

That's a server-side issue. HTML doesn't know or care how your server
processes uploaded data.

Since you haven't told us what server-side technology is handling the
upload, we can't tell you how to configure it.
 
M

Mark

Leif said:
That's a server-side issue. HTML doesn't know or care how your server
processes uploaded data.

Since you haven't told us what server-side technology is handling the
upload, we can't tell you how to configure it.

Ah... I was told I could do something like <input
type="public_html/folder/file"> but... that didn't strike me as right.

However, apparently it can be set in php.ini (since I am using php
anyways...)
 
J

jojo

Mark said:
However, apparently it can be set in php.ini (since I am using php
anyways...)

If you have acces to it. But this isn't always the case. Some webhosters
do not givew you acces to it because of security reasons. They perhaps
block some PHP-functions which they consider to be a security problem
and do not want them to get activated again (Just one example, there are
a lot more).
But a way that would always work is to copy the temporary file into your
directory:

copy ($_FILES['NAME_OF_YOUR_INPUT']['tmp_name'],
"PATH_TO_YOUR_DIRECTORY".$_FILES['NAME_OF_YOUR_INPUT']['name']);

HTH, jojo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top