[PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Colin Guthrie
T.Lensselink wrote: On Wed, 21 Nov 2007 08:38:18 -0600, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Seems to me Pere want's to do an upload without reloading the whole page. [/snip] The problem is that you cannot upload files using Ajax alone. But you can do it without a reload,

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jochem Maas
Colin Guthrie wrote: T.Lensselink wrote: On Wed, 21 Nov 2007 08:38:18 -0600, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] Seems to me Pere want's to do an upload without reloading the whole page. [/snip] The problem is that you cannot upload files using Ajax alone. But you can do it

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread tedd
Hi gang: So that I can get my head around this, are all of you saying there is no Ajax equivalent of: form action=index.php enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=2048000 input name=userfile type=file input type=hidden name=stage value=1 input

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Andrés Robinet
). Hope not to be far from thruth Rob (sorry, top posting, we've all read the rest of it :D) -Original Message- From: tedd [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 2:13 PM To: Jochem Maas; Colin Guthrie Cc: php-general@lists.php.net Subject: Re: [PHP] Re: uploading

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jay Blanchard
[snip] That is correct. Without an IFRAME you cannot upload a file without a refresh. [/snip] Take Two. You could also open another window, but that kinda defeats the purpose. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jochem Maas
Jay Blanchard wrote: [snip] So that I can get my head around this, are all of you saying there is no Ajax equivalent of: form action=index.php enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=2048000 input name=userfile type=file input type=hidden

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jay Blanchard
[snip] So that I can get my head around this, are all of you saying there is no Ajax equivalent of: form action=index.php enctype=multipart/form-data method=post input type=hidden name=MAX_FILE_SIZE value=2048000 input name=userfile type=file input type=hidden name=stage value=1 input

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread tedd
At 11:32 AM -0600 11/21/07, Jay Blanchard wrote: [snip] huh? if I post a file to a script that returns a 204 status and nothing else then the page should not change in the browser. [/snip] True, the missing piece is that the post cannot move the file up to the server. Ahhh, so that's it. My

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jay Blanchard
[snip] huh? if I post a file to a script that returns a 204 status and nothing else then the page should not change in the browser. [/snip] True, the missing piece is that the post cannot move the file up to the server. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jay Blanchard
[snip] Ahhh, so that's it. My twitchy little brain was thinking if I can send arguments to the server via ajax, then why can't I send multipart/form-data? After all, data is data right? It might be too cpu intensive, but I can imagine js breaking down an image file in packets and then sending

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jochem Maas
tedd wrote: At 12:23 PM -0600 11/21/07, Jay Blanchard wrote: [snip] But, take a look at this: http://www.captain.at/ajax-file-upload.php They look like their blowing the same wind. [/snip] Yep, look at all of the gotchas. Well, I wasn't able to get it to work -- I couldn't find

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jochem Maas
Jay Blanchard wrote: [snip] huh? if I post a file to a script that returns a 204 status and nothing else then the page should not change in the browser. [/snip] True, the missing piece is that the post cannot move the file up to the server. I was referring to a standard POST not using

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread tedd
At 12:23 PM -0600 11/21/07, Jay Blanchard wrote: [snip] But, take a look at this: http://www.captain.at/ajax-file-upload.php They look like their blowing the same wind. [/snip] Yep, look at all of the gotchas. Well, I wasn't able to get it to work -- I couldn't find where to change the FF

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread tedd
At 11:49 AM -0600 11/21/07, Jay Blanchard wrote: [snip] Ahhh, so that's it. My twitchy little brain was thinking if I can send arguments to the server via ajax, then why can't I send multipart/form-data? After all, data is data right? It might be too cpu intensive, but I can imagine js

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Jay Blanchard
[snip] But, take a look at this: http://www.captain.at/ajax-file-upload.php They look like their blowing the same wind. [/snip] Yep, look at all of the gotchas. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread Andrés Robinet
-Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2007 3:24 PM To: tedd; Jochem Maas Cc: Colin Guthrie; php-general@lists.php.net Subject: RE: [PHP] Re: uploading files... necessary Ajax? [snip] But, take a look at this: http

Re: [PHP] Re: uploading files... necessary Ajax?

2007-11-21 Thread tedd
At 8:03 PM +0100 11/21/07, Jochem Maas wrote: tedd wrote: Well, I wasn't able to get it to work -- I couldn't find where to change the FF settings (Mac). type 'about:config' into the address bar :-) I know I'll get a big argument from all of you about this, but sometimes I can be pretty

[PHP] Re: Uploading Files into MySQL

2007-05-24 Thread Jared Farrish
I am working on a script to upload files into MySQL db. The following script uploads to a file system how do I go about uploading the file into the DB? Where do I put the SQL statement in the code below? Let's see: script upload file mysql database Hmm, add php and you have Google php

Re: [PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-22 Thread clive
itoctopus wrote: I have tried both, and I tell you that I really felt that the filesystem is a more convenient way of doing it. I have to agree, filesystems were after all designed to store files. I reckon reading a file from disk is much quicker than reading from a database, maybe only

Re: [PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-22 Thread Tijnema
On 5/22/07, clive [EMAIL PROTECTED] wrote: itoctopus wrote: I have tried both, and I tell you that I really felt that the filesystem is a more convenient way of doing it. I have to agree, filesystems were after all designed to store files. I reckon reading a file from disk is much quicker

Re: [PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-22 Thread Robert Cummings
On Tue, 2007-05-22 at 11:00 +0200, clive wrote: itoctopus wrote: I have tried both, and I tell you that I really felt that the filesystem is a more convenient way of doing it. I have to agree, filesystems were after all designed to store files. I reckon reading a file from disk is much

[PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Jonathan
[EMAIL PROTECTED] wrote: I am in the process of adding a part to my website which would include pictures, pdf files, txt files, and excel files. The files sizes could be anywhere on average of 100k to 2mb. Do you think I should be uploading the files to a MySQL database or to my server? I

[PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-21 Thread Al
Best of both worlds may be SQLite. ZEND has a nice article on the subject. [EMAIL PROTECTED] wrote: I am in the process of adding a part to my website which would include pictures, pdf files, txt files, and excel files. The files sizes could be anywhere on average of 100k to 2mb. Do you

[PHP] Re: Uploading Files Should I use MySQL or Server for storage?

2007-05-20 Thread itoctopus
I have tried both, and I tell you that I really felt that the filesystem is a more convenient way of doing it. -- itoctopus - http://www.itoctopus.com [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] I am in the process of adding a part to my website which would include pictures, pdf

[PHP] Re: uploading files

2005-04-13 Thread Matthew Weier O'Phinney
* Marc Serra [EMAIL PROTECTED]: Hi, i want to create a form to upload a file on a server. My problem is that i want to check the filesize before sending it because if the filesize is superior than 2 MB it failed and i don't want to wait for a long time for uploading a file that will fail.

[PHP] Re: Uploading Files

2004-02-24 Thread Tom Wollaston
My script now reads: ?php $uploadpath = /home/sites/site176/web/makeit; if($userfile) { move_uploaded_file ($_FILES ['userfile']['tmp_name'], $uploadpath/$userfile_name); echo $userfile_name; echo Successfully Added!br\n; //$username : contains the name of TMP file, $usrfile_name : it's the

[PHP] Re: uploading files

2002-11-01 Thread Shaun Thornburgh
My apologies, here is the code! //copy image to server if ($image != none) { if (copy ($image, $dir.$image_name)){ echo pFile upload successful!/p; } else { echo pFile upload unsuccessful!/p; } //new name of image $new_name = $property_id-$category_id-$sub_category_id.jpg;

Fw: [PHP] Re: uploading files

2002-11-01 Thread Kevin Stone
] Re: uploading files My apologies, here is the code! //copy image to server if ($image != none) { if (copy ($image, $dir.$image_name)){ echo pFile upload successful!/p; } else { echo pFile upload unsuccessful!/p; } //new name of image $new_name = $property_id

Re: [PHP] Re: uploading files

2002-11-01 Thread Shaun Thornburgh
- From: Shaun Thornburgh [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 01, 2002 1:51 PM Subject: [PHP] Re: uploading files My apologies, here is the code! //copy image to server if ($image != none) { if (copy ($image, $dir.$image_name)){ echo pFile upload

[PHP] Re: uploading files

2002-10-07 Thread Jason Young
How are you handling the transfer of files between its temporary area and where it's going to be stored? If you're copying instead of moving, I would imagine the file in the temp directory would still be present. -Jason Donahue Ben wrote: I am uploading a gif file using

Re: [PHP] Re: uploading files

2002-10-07 Thread Kevin Stone
Message - From: Jason Young [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, October 07, 2002 11:24 AM Subject: [PHP] Re: uploading files How are you handling the transfer of files between its temporary area and where it's going to be stored? If you're copying instead of moving, I would

[PHP] Re: Uploading Files

2002-10-04 Thread eriol
Jason [EMAIL PROTECTED] disgorged: : I would like to be able to upload files from the client computer to the : server via a form. I know how to build the form, but am not sure of the : best way to process this. I know there are certain ftp functions that can : do this, which I'm not sure how

[PHP] Re: Uploading Files

2002-10-04 Thread Jason
Okay, I checked out the link listed below, and tried using what is given there, but I get the following error: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in d:\www_root\locutus\phpman\admin\test.php on line 16 Here's the code

[PHP] Re: Uploading Files

2002-10-04 Thread eriol
Jason [EMAIL PROTECTED] disgorged: : ?php : move_uploaded_file($_FILES['userfile']['tmp_name'], : ../images/$_FILES['userfile']['name']); : ? : : I am able to get rid of this error, but changing the line to: : move_uploaded_file($_FILES['userfile']['tmp_name'], :

[PHP] Re: uploading files problem

2002-03-29 Thread andy
put dubble quotes inside your html. I think this is in the spec, as soon as it is no numeric format: input type=file name=file size=30 Cheers, Andy Claudio Fedel [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... hi there, I'm trying to upload a file

[PHP] Re: Uploading Files through PHP

2002-02-27 Thread Andy
maybe your code is inside a function. If this is the case set the var to global. Andy Georgie Casey [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I'm trying to let users upload word files through a PHP form but its not working! The script keeps telling

[PHP] Re: uploading files | how to avoid submitting twice?

2002-02-25 Thread George Whiffen
Jim Winstead wrote: Andy [EMAIL PROTECTED] wrote: Is there a way to redirect imediatelly to a waiting page? I tryed to redirect, but somehow the server is first uploading the file before something else happens. unfortunately, no. one thing you can do is use javascript to pop up a small

[PHP] Re: uploading files | how to avoid submitting twice?

2002-02-23 Thread Jim Winstead
Andy [EMAIL PROTECTED] wrote: Is there a way to redirect imediatelly to a waiting page? I tryed to redirect, but somehow the server is first uploading the file before something else happens. unfortunately, no. one thing you can do is use javascript to pop up a small window in your form's

[PHP] Re: Uploading Files with PHP

2002-02-22 Thread Lerp
Hi Jim, here's how I do it. I test for the file size on the processing page as well, if it's too large I redraw out the upload form. //test for file extension type if needed //determine file size -- if too big ( greater 50kb) then redirect $siz = filesize($userfile); if ($siz = 51200){

[PHP] Re: Uploading Files with PHP

2002-02-22 Thread Lerp
Ammendment: Actually, I was just looking at one of my photoupload processes and I actually removed the MAX_FILE out of the upload form and only tested the file size on the processing page like in the previous message. Cheers, Joe :) Lerp [EMAIL PROTECTED] wrote in message [EMAIL

[PHP] Re: Uploading Files with PHP

2002-02-21 Thread Jim Koutoumis
Joe, Do you know when the file size is checked ?? I think it only gets checked after the form is posted and file uploading is finished ?? I don't know how it's possible to catch things before user uploads - now that would be neat :-) Jim. Lerp [EMAIL PROTECTED] wrote in message [EMAIL