Ask a Question related to Macromedia Contribute General Discussion, Design and Development.
-
Sammy the Bull #1
Uploading Files
Hi,
Can someone point me in the right direction for how I can upload a file to
the server, and overwrite the existing file if there is one.
Thanks.
Sammy the Bull Guest
-
Problems: uploading files have Chinese named files
Hi everyone, I try to upload file by using asp.net, code like that: <script language="VB" runat="server"> Sub Upload(Source As Object, e As... -
[PHP] Uploading files via SSH
Google for "Failed to scan directories. Error 6" (including quotes). First result is the ssh.com faq, which has a link to... -
Uploading files in C#
why don't you examine the extension of the file being loaded. "Ian Walsh" <ianwalsh@hbosplc.com> wrote in message... -
Uploading Files - help please
When you use: <Input ID="ImageUpload" Type="File" visible="false" RunAt="Server"> Is their any way you can make a starting value appear inside... -
Uploading files using FTP in ASP.NET
If you follow this link, you'll find a few ftp samples: http://www.gotdotnet.com/community/usersamples/Default.aspx?query=ftp Here's one that... -
Ray at #2
Re: Uploading Files
Go to [url]www.aspfaq.com[/url] and enter this search phrase:
How do I upload files from the client to the server?
Ray at work
"Sammy the Bull" <sendmelotsofspam@spam.com> wrote in message
news:%23qUUSlPXDHA.2312@TK2MSFTNGP10.phx.gbl...> Hi,
>
> Can someone point me in the right direction for how I can upload a file to
> the server, and overwrite the existing file if there is one.
>
> Thanks.
>
>
Ray at Guest
-
Jeff Thies #3
Re: Uploading Files
Sammy the Bull wrote:I've found that ASPFaq.com blows the socks off of MS docs:>
> Hi,
>
> Can someone point me in the right direction for how I can upload a file to
> the server, and overwrite the existing file if there is one.
[url]http://www.aspfaq.com/2189[/url]
I've just tried freeaspupoad, it works for me and comes in under budget.
Cheers,
Jeff
>
> Thanks.Jeff Thies Guest
-
Joshua Ghiloni #4
Re: Uploading files
>
Try C:/Temp> file_uploads = 1
> upload_max_filesize = 2M
> upload_tmp_dir = c:\Temp (tried c:\\Temp, too)
> post_max_size = 8M
>
Joshua Ghiloni Guest
-
Terry Austin #5
Re: Uploading files
Joshua Ghiloni <jdg11@SPAM.ME.AND.DIE.cwru.edu> wrote in
news:bhjdam$9sg$1@eeyore.INS.cwru.edu:
Same results.>>>
>> file_uploads = 1
>> upload_max_filesize = 2M
>> upload_tmp_dir = c:\Temp (tried c:\\Temp, too)
>> post_max_size = 8M
>>
> Try C:/Temp
>
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Thomas Mlynarczyk #6
Re: Uploading files
Also sprach Terry Austin:
Try "c:\Temp\" (Slash at the end!)> Joshua Ghiloni <jdg11@SPAM.ME.AND.DIE.cwru.edu> wrote in
> news:bhjdam$9sg$1@eeyore.INS.cwru.edu:
>> Same results.>>>>>
>>> file_uploads = 1
>>> upload_max_filesize = 2M
>>> upload_tmp_dir = c:\Temp (tried c:\\Temp, too)
>>> post_max_size = 8M
>>>
>> Try C:/Temp
>>
--
Thomas Mlynarczyk Guest
-
Terry Austin #7
Re: Uploading files
"Thomas Mlynarczyk" <blue_elephant55@hotmail.com> wrote in
news:bhjhjn$lp0$00$1@news.t-online.com:
Same results.> Also sprach Terry Austin:
>>>> Joshua Ghiloni <jdg11@SPAM.ME.AND.DIE.cwru.edu> wrote in
>> news:bhjdam$9sg$1@eeyore.INS.cwru.edu:
>>>> Same results.>>>>
>>>> file_uploads = 1
>>>> upload_max_filesize = 2M
>>>> upload_tmp_dir = c:\Temp (tried c:\\Temp, too)
>>>> post_max_size = 8M
>>>>
>>>
>>> Try C:/Temp
>>>
> Try "c:\Temp\" (Slash at the end!)
>
I've checked permissions on the directory, and
re-entered them to be sure. At the moment, "Everyone" as "Full Control"
permissions, which should cover it
I tried turning on auditing on file events, and tried an upload. I'm seeing
a series of events with User Administrator in C:\Temp (which is what's
specified in php.ini), which is me playing with Explorer. And I see a
series of events with User System in C:\WINNT\Temp involving a file called
_246_166_2.wrk, with the same Process ID as the file accesses in the
directory the upload script is in. So it looks like, for some reason,
either Apache or PHP (whichever is handling the writing of the temp file)
is not putting the temp file in the right place (assuming that .wrk file is
the temp file). But it's looking for it in the right place when the script
later tries to move it?
And there are no failed events, only successful ones, from what looks like
changing in to the directly to writing the file, to reading the directory
information, to reading the file, to deleting the file.
Now, I'm very confused.
Why would it put the temp file in c:\winnt\temp (which is the system temp
directory) instead on the explicitly assigned temp directory in php.ini?
And why would it then not be able to find it?
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Thomas Mlynarczyk #8
Re: Uploading files
Have you tried just to echo the elements of $_FILES[]? It should give you
the temp path being used.
Thomas Mlynarczyk Guest
-
Terry Austin #9
Re: Uploading files
"Thomas Mlynarczyk" <blue_elephant55@hotmail.com> wrote in
news:bhkmnm$akr$03$1@news.t-online.com:
Tried that. Same result.> Also sprach Terry Austin:
>>>>> Try "c:\Temp\" (Slash at the end!)>>> Same results.
> Maybe you forgot a temp directory setting somewhere? Try removing all
> your temp dir settings and see if it works with the defaults.
Everything is pretty much copy&pasted from the manual, with paths adjusted> Which is
> the exact code you are using (copy&paste!)?
>
as necessary.
The form is:
<form enctype="multipart/form-data" action="upload.php" method="post">
<input type="hidden" name="MAX_FILE_SIZE" value="30000">
Send this file: <input name="userfile" type="file">
<input type="submit" value="Send File">
</form>
(the file I've been testing with is about 3.5k)
upload.php is:
$uploaddir = "c:\Temp";
print "<pre>";
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .
$_FILES['userfile']['name'])) {
print "File is valid, and was successfully uploaded. Here's some more
debugging info:\n";
print_r($_FILES);
} else {
print "Possible file upload attack! Here's some debugging info:\n";
print_r($_FILES);
print $_FILES['userfile']['error'];
The print_r produces:
Array
(
)
the other print produces nothing at all.
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Terry Austin #10
Re: Uploading files
"Thomas Mlynarczyk" <blue_elephant55@hotmail.com> wrote in
news:bhkmsl$r6r$04$1@news.t-online.com:
Is that what print_r($_FILES); does? All it produces is> Have you tried just to echo the elements of $_FILES[]? It should give you
> the temp path being used.
>
Array
(
)
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Terry Austin #11
Re: Uploading files
"Thomas Mlynarczyk" <blue_elephant55@hotmail.com> wrote in
news:bhstno$cdq$02$4@news.t-online.com:
Double slash, that is. A single slash produces an error.> Also sprach Terry Austin:
>>>> $uploaddir = "c:\Temp";
> $uploaddir="C:/Temp/"; // Slash at the end!That is the conclusion I keep coming to. Except for the *.wrk files that>>>> print "<pre>";
>> if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploaddir .
>> $_FILES['userfile']['name'])) {
>> print "File is valid, and was successfully uploaded. Here's some more
>> debugging info:\n";
>> print_r($_FILES);
>> } else {
>> print "Possible file upload attack! Here's some debugging info:\n";
>> print_r($_FILES);
>> print $_FILES['userfile']['error'];>>> The print_r produces:>>> Array
>> (
>> )
> It seems the $_FILES array is empty. My only explanation is that some
> server or php setting is preventing the upload.
show up when I turn on file access auditing in NT.
That's what is actually in php.ini. phpinfo was reporting it> You said your config
> was
>>>>> file_uploads = 1
>>> upload_max_filesize = 2M
>>> upload_tmp_dir = c:\Temp (tried c:\\Temp, too)
>>> post_max_size = 8M
> which looks valid to me. I use "file_uploads = On"
as "1". I upgraded from 4.2.2 to 4.3.2 yesterday, BTW (which
does report it as On), with the same results.
Tried that, with the same results.>and I don't specify
> any upload_tmp_dir (commented out).
Everything else seems to be working. I can POST form data without>I don't know what other settings
> might influence file uploads (I'm using WinXP, maybe NT4 is causing
> the problem). Have you tried if other auto globals "work" or if this
> concerns only $_FILES?
submitting file, and that works fine.
Last night, I tried the same form and script on a 98 machine at home, but
with the same version of Apache and PHP, and got the same results - I
think. I'm beginning to think it's something in the OpenSA version of
Apache that is handling the temp files incorrectly. I really didn't want to
have to figure out how to manually configure SSL stuff. Sigh. I think I'll
try uninstalling Apache completely, and rebuild it from scratch with an
unaltered version from apache.org.Oh, you've helped eliminate stuff it's not, which is something. Thanks for>
> Sorry that I can't be more helpful.
>
that, at least.
I guess I need to become an expert on Apache and PHP. Story of my life.
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Terry Austin #12
Re: Uploading files
"Thomas Mlynarczyk" <blue_elephant55@hotmail.com> wrote in
news:bhkmsl$r6r$04$1@news.t-online.com:
OK, I dumped the OpenSA install, and started over with the lastest stable> Have you tried just to echo the elements of $_FILES[]? It should give you
> the temp path being used.
>
build of Apache 1.3 from apache.org, and the lastest version of PHP, and
now everything works. Something is broken in OpenSA. Sigh.
Thanks for the help.
--
Larry Flynt for Governor
Bringing dignity back to the Governor's Mansion
Terry Austin
[email]taustin@hyperbooks.com[/email]
Terry Austin Guest
-
Sindre Hiåsen #13
uploading files
Hi,
I have made a php script for uploading files to the server. It works fine
on the pre test:
if (($uploadDir == "ERROR") OR ($uploadLogDir == "ERROR"))
{
return false;
}
else
{
if (is_uploaded_file($tempFileName))
{
but this next test goes false:
if (move_uploaded_file($tempFileName,$uploadDir . $fileName))
{
Someone with a clue on this?
Sindre
--
Sender med M2, Operas revolusjonerende e-postprogram: [url]http://www.opera.com/[/url]
Sindre Hiåsen Guest
-
Janwillem Borleffs #14
Re: uploading files
Sindre Hiåsen wrote:
Check the permissions of the target dir.> but this next test goes false:
> if (move_uploaded_file($tempFileName,$uploadDir . $fileName))
> {
>
> Someone with a clue on this?
>
JW
Janwillem Borleffs Guest
-
CanWesTech #15
Uploading Files
Hi
I am realtively new to CF. I am trying to accomplish something that I am not
sure i can do with CF. I want to have visitors to a page on our site have the
ability to upload files to a specific folder on our website. I have no access
to CF on the server side as it is a service provided by my ISP. I have tried
CFFILE with no luck. I have successfully done it with CFFTP but i am unable to
pass the file name via a form. It seems to want to pass the entire path which
causes errors when the file is uploaded. Does any one have a very simple
solution to this. If so I wouls very much it. Please email me at
[email]webmaster@clcintersol.com[/email] or reply here. Many thanks in advance
I believe my ISP is using CF 5
CanWesTech Guest
-
Knum #16
Re: Uploading Files
I had the same problem along time ago and I know that doesn't help you at
all... err sorry... Try <cfoutput>#Server.ColdFusion.ProductName# and
#Server.ColdFusion.ProductVersion#</cfoutput> to find out what you ISP is
running
Knum Guest
-
gwgiswebmaster #17
Re: Uploading Files
your ISP may have disabled that tag, ck with them to verify
gwgiswebmaster Guest
-
CoffeeCup #18
Re: Uploading Files
This is the code I use: (This is taken straight form a web site, so you will
need to work through the code) I will also update fields in the database. Good
luck 1st - the form page: <table width='100%' border='0' cellpadding='5'
cellspacing='0' class='textPlain12'> <form action='HR_addFormAction.cfm'
method='post' enctype='multipart/form-data'> <input name='HR_DocID'
type='hidden' value='<cfoutput>#getDetails.HR_DocumentID#</cfoutput>'>
<input name='HR_FormAddDate' type='hidden' value='<cfoutput>#DateFormat(Now(),
'dd mmmm yyyy')#</cfoutput>'> <input name='HR_FormStatus'
type='hidden' value='Live'> <tr> <td align='left'>Form
Name : <input name='HR_FormTitle' type='text' size='30'
maxlength='60'> Form Number: <select
name='HR_FormNumber' class='textPlain12'> <option value='1'
selected>1</option> <option value='2'>2</option>
<option value='3'>3</option> <option value='4'>4</option>
<option value='5'>5</option> <option
value='6'>6</option> <option value='7'>7</option>
<option value='8'>8</option> <option value='9'>9</option>
<option value='10'>10</option> <option
value='11'>11</option> <option value='12'>12</option>
<option value='13'>13</option> <option
value='14'>14</option> <option value='15'>15</option>
</select> Form Reference: <input
name='HR_FormRef' type='text' size='12' maxlength='20'> </td>
</tr> <tr> <td>Add Document: <input
name='HR_FormFileName' type='file' size='40'> (See &quot;Hints&quot;)
</td> </tr> <tr> <td align='center'><input
type='submit' value='Add Form'> </td> </tr>
</form> </table> Action page: <!--- Update the general information
first ---> <!--- Check to see if the details have been passed ---> <cfparam
name='FORM.HR_DocID' default='0'> <cfparam name='FORM.HR_FormTitle'
type='string' default=''> <cfparam name='FORM.HR_FormFileName' type='string'
default=''> <cfparam name='formFolder' default=''> <cfparam name='FieldError'
default='NONE'> <cfparam name='FileFieldError' default='NONE'> <cfif
IsDefined('FORM.HR_FormFileName')> <!--- Set up the diffrent image folder and
verialbles ---> <cfset URL.HR_DocID = FORM.HR_DocID> <cfif IsDefined
('FORM.HR_FormTitle')> <cfset FolderName = 'forms'> <!--- Now set
the Image Folder variable to be used by CFFILE---> <cfset formFolder =
ExpandPath('#FolderName#')> <cfelse> <cfset FieldError = 'Error: You
must select a Document.'> <cfabort> </cfif> <cfif FORM.HR_FormFileName EQ
''> <cfset FileFieldError = 'Error: You must select a document file to
upload.'> <cfabort> </cfif> </cfif> <!--- Upload the image ---> <cfif
isDefined('FORM.HR_FormFileName') AND (FORM.HR_FormFileName NEQ '') AND
(FieldError EQ 'NONE') AND (FileFieldError EQ 'NONE')> <cftry> <cffile
action='upload' filefield='HR_FormFileName' destination='#formFolder#'
nameconflict='makeunique' accept=''> <!--- Make sure the file is't more
that 80K ---> <cfif CFFILE.FileSize GT 1132250> <cfthrow
type='SizeError' message='Error: The document cannot be greater than 200
kilobytes which is the maximum size allowed, please select another one and try
again.'> </cfif> <!--- Catch the size error ---> <cfcatch
type='SizeError'> <cfabort showerror='#cfcatch.Message#'>
</cfcatch> </cftry> <!--- Store the name of the file inside the form
variable ---> <cfset FORM.HR_FormFileName=file.ServerFile> <!--- Insert all the
data to the database ---> <cfinsert datasource='#REQUEST.DataSource#'
tablename='tblHRFroms'> </cfif> <!--- Send the user back --->
<cflocation url='HR_addForm_1.cfm'>
CoffeeCup Guest
-
pepps #19
Uploading Files
Hi can anyone help? I have a database on our website that holds all of the
products that we sell. I have created some asp pages that lets an admin user
edit all of the products on the database. However alot of the products have
..pdf datasheets that would need to be viewed when clicking on an apropriate
link. The question is how can i have it so that the admin user that is editing
the products can upload .pdf to an apropriate directory and the correct path
will be added to the web database so that the pdf can be viewed. Thanks John
pepps Guest
-
Manuel Socarras #20
Re: Uploading Files
you can use a component like ASPUpload or take a look at Pure ASP File
Upload
pepps wrote:> Hi can anyone help? I have a database on our website that holds all of the
> products that we sell. I have created some asp pages that lets an admin user
> edit all of the products on the database. However alot of the products have
> .pdf datasheets that would need to be viewed when clicking on an apropriate
> link. The question is how can i have it so that the admin user that is editing
> the products can upload .pdf to an apropriate directory and the correct path
> will be added to the web database so that the pdf can be viewed. Thanks John
>Manuel Socarras Guest



Reply With Quote

