RE: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-09 Thread Richard Lynch
On Sun, May 8, 2005 9:22 pm, Murray @ PlanetThoughtful said:
 As others have suggested, using an ftp client application is one way to
 handle it, however, users being users, the feedback has been Why do we
 need
 to upload the files via an ftp client, *then* go to the web application
 and
 attach the filename to a job entry? Why can't we do it all at once?

Some alternatives to consider:

If you can get them to name their files in some consistent manner, perhaps
you could determine the job entry from their filenames.

So they upload a file names 'job4732.zip' and they are done.  Your PHP
script checks their FTP space for the file, examines the filename, and
knows what job entry to tie it to.

Another possibility is that the content within the file may somehow
indicate what job the file belongs with.

You may even be able to check *both* their filename and the contents, and
have the program cross-check for consistency, and only auto-process the
ones that pass both tests.

If the filenames would be too long perhaps you could have them use some
kind of pre-built directory structure on their desktop where they drop
their files into the right job entry

Then you have a .bat file that runs through the directories and compares
date/time stamps and uploads new files.

There are a lot of possible solutionns, really, but it depends on the work
flow and actual data what's best

Certainly if you can make life easier for them *AND* maintain, or even
improve, accuracy of the data upload and data entry, it's worth some
development time.

Hey, maybe you even install php.exe on their desktops, and write the
synchronization script in PHP :-)

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-09 Thread Burhan Khalid
Murray @ PlanetThoughtful wrote:
[ snipped ]
when u upload it name it dynamiccaly by appending date and time before
the file name
like this
2005050501010-filename.jpg

Hi, yes, I'm already doing this. Conflict of filename isn't my issue -- it's
whether or not the file should be uploaded at all, in the first place.
The difficulty being that you can't examine the file until *after* it has
been uploaded.
As others have suggested, using an ftp client application is one way to
handle it, however, users being users, the feedback has been Why do we need
to upload the files via an ftp client, *then* go to the web application and
attach the filename to a job entry? Why can't we do it all at once?
The answer being, Well, you can, but I bet you're going to be even more
annoyed when you've uploaded a huge file via the web application using the
POST upload method, only to find that the file is already there. Serves you
right for having too many stakeholders in uploading the files, dunnit?
Here is one thing you can try.  Create a button that (using javascript) 
passes the name of the file to another script -- which then scans your 
files directory to see if the file exists already. If it does, it 
submits an alert or some other indication.

You will have to standardize on the file time. I would suggest that you 
only use the file's meta-data on the server so that users can check when 
the file was last updated on the server, not on their boxes.  Some other 
information (like last uploaded by) would also be helpful from a user's 
standpoint.

Hope this helps,
Burhan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-09 Thread Jared Williams

 Hi All,
 
  
 
 I need to implement the ability to ftp upload files from 
 client machines via a form in a web application I'm developing.
 
  
 
 From reading the PHP help, all I can find to perform this is 
 the POST method for handling file uploads 
 (http://au2.php.net/manual/en/features.file-upload.php).
 
  
 
 From my perspective, while this seems to work, there are a 
 couple of drawbacks, most important of which is that it seems 
 you can only do comparisons of the uploaded file, against the 
 potential that the file has already been uploaded, once the 
 file has already been uploaded and is sitting in the server 
 temp directory.
 
  
 
 This is a drawback to our application because the files can 
 typically vary on a daily basis in size from 20mb thru to 
 400mb, and 400mb seems like a lot of bandwidth to consume to 
 discover that the file already exists on our server.
 

Hmm, sounds like you just want to send something like a hash first 
Like the SHA1 of the file. 
So would need ActiveX/Java obect to perform the SHA1 of the file client side 
first.
Send that, if it hasn't been seen then send the whole file.

As for other methods... 

You could try WebDAV and the PUT method. There is a PHP implementation of a 
WebDAV server in PEAR. Its not form based, but would
make it somewhat more easier to upload than using FTP atleast. I believe WinXP 
can attach directly to them, or use Novells' NetDrive
to map a drive letter to the WebDAV server.

Jared



 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Murray @ PlanetThoughtful
Hi All,

 

I need to implement the ability to ftp upload files from client machines via
a form in a web application I'm developing.

 

From reading the PHP help, all I can find to perform this is the POST method
for handling file uploads
(http://au2.php.net/manual/en/features.file-upload.php).

 

From my perspective, while this seems to work, there are a couple of
drawbacks, most important of which is that it seems you can only do
comparisons of the uploaded file, against the potential that the file has
already been uploaded, once the file has already been uploaded and is
sitting in the server temp directory.

 

This is a drawback to our application because the files can typically vary
on a daily basis in size from 20mb thru to 400mb, and 400mb seems like a lot
of bandwidth to consume to discover that the file already exists on our
server.

 

I had hoped there was a way in which I could retrieve stats of the file
being uploaded prior to beginning the upload, to compare against files in
the target directory, so that the application can advise the user that the
file already exists and to give them the option to cancel the upload.

 

Another minor drawback is that it seems the Post upload method changes the
file datetime to the datetime of the upload. 

 

So, can anyone confirm that there is no other way to upload files from a
client machine using a form? (and assuming they don't have an ftp server at
their end).

 

Much warmth,

 

Murray

 



Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Richard Davey
Hello Murray,

Sunday, May 8, 2005, 9:20:58 PM, you wrote:

MP So, can anyone confirm that there is no other way to upload files
MP from a client machine using a form? (and assuming they don't have
MP an ftp server at their end).

Forms can only POST (or GET, but we'll ignore that for now) data.
That's it. Welcome to the HTTP protocol, I'm afraid there is no
getting around this.

You can try using a signed Java applet to allow local uploading,
otherwise teach the end users how to use FTP clients? Your options
run out right about here. PHP being a server side language can only
deal with a file once it hits the server, if you want to check files
client side before they're uploaded, you need a client side language.

Best regards,

Richard Davey
-- 
 http://www.launchcode.co.uk - PHP Development Services
 I do not fear computers. I fear the lack of them. - Isaac Asimov

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Marek Kilimajer
Murray @ PlanetThoughtful wrote:
Hi All,
 

I need to implement the ability to ftp upload files from client machines via
a form in a web application I'm developing.
 

From reading the PHP help, all I can find to perform this is the POST method
for handling file uploads
(http://au2.php.net/manual/en/features.file-upload.php).
 

From my perspective, while this seems to work, there are a couple of
drawbacks, most important of which is that it seems you can only do
comparisons of the uploaded file, against the potential that the file has
already been uploaded, once the file has already been uploaded and is
sitting in the server temp directory.
 

This is a drawback to our application because the files can typically vary
on a daily basis in size from 20mb thru to 400mb, and 400mb seems like a lot
of bandwidth to consume to discover that the file already exists on our
server.
 

I had hoped there was a way in which I could retrieve stats of the file
being uploaded prior to beginning the upload, to compare against files in
the target directory, so that the application can advise the user that the
file already exists and to give them the option to cancel the upload.

PHP script starts once the upload is finished, but this is not true for 
some other languages, for example perl.

Another minor drawback is that it seems the Post upload method changes the
file datetime to the datetime of the upload. 
Browsers don't send file's modificaton time, so it's not available.
 

So, can anyone confirm that there is no other way to upload files from a
client machine using a form? (and assuming they don't have an ftp server at
their end).
Cliens need ftp client software, some sort is for sure installed on 
every machine.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Richard Lynch

JavaScript *might* let the user choose a file and get its modification
date/time...

And then you could upload pieces of it at a time via JavaScript, I think.

Incredibly inefficient, most likely, but you *COULD*

You may want to just give the users training in some EZ ftp client, freely
available.

At any rate, it's unlikely that PHP will fit in to your solution for the
features you need...

On Sun, May 8, 2005 1:20 pm, Murray @ PlanetThoughtful said:
 Hi All,



 I need to implement the ability to ftp upload files from client machines
 via
 a form in a web application I'm developing.



 From reading the PHP help, all I can find to perform this is the POST
 method
 for handling file uploads
 (http://au2.php.net/manual/en/features.file-upload.php).



 From my perspective, while this seems to work, there are a couple of
 drawbacks, most important of which is that it seems you can only do
 comparisons of the uploaded file, against the potential that the file has
 already been uploaded, once the file has already been uploaded and is
 sitting in the server temp directory.



 This is a drawback to our application because the files can typically vary
 on a daily basis in size from 20mb thru to 400mb, and 400mb seems like a
 lot
 of bandwidth to consume to discover that the file already exists on our
 server.



 I had hoped there was a way in which I could retrieve stats of the file
 being uploaded prior to beginning the upload, to compare against files in
 the target directory, so that the application can advise the user that the
 file already exists and to give them the option to cancel the upload.



 Another minor drawback is that it seems the Post upload method changes the
 file datetime to the datetime of the upload.



 So, can anyone confirm that there is no other way to upload files from a
 client machine using a form? (and assuming they don't have an ftp server
 at
 their end).



 Much warmth,



 Murray






-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread bala chandar
Hi,

On 5/9/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote:
 Hi All,
 
 I need to implement the ability to ftp upload files from client machines via
 a form in a web application I'm developing.
 
 From reading the PHP help, all I can find to perform this is the POST method
 for handling file uploads
 (http://au2.php.net/manual/en/features.file-upload.php).
 
 From my perspective, while this seems to work, there are a couple of
 drawbacks, most important of which is that it seems you can only do
 comparisons of the uploaded file, against the potential that the file has
 already been uploaded, once the file has already been uploaded and is
 sitting in the server temp directory.

Instead use the dynamic file names

say you upload a file filename.jpg

when u upload it name it dynamiccaly by appending date and time before
the file name
 like this

2005050501010-filename.jpg


 
 This is a drawback to our application because the files can typically vary
 on a daily basis in size from 20mb thru to 400mb, and 400mb seems like a lot
 of bandwidth to consume to discover that the file already exists on our
 server.
 
 I had hoped there was a way in which I could retrieve stats of the file
 being uploaded prior to beginning the upload, to compare against files in
 the target directory, so that the application can advise the user that the
 file already exists and to give them the option to cancel the upload.
 
 Another minor drawback is that it seems the Post upload method changes the
 file datetime to the datetime of the upload.
 
 So, can anyone confirm that there is no other way to upload files from a
 client machine using a form? (and assuming they don't have an ftp server at
 their end).
 
 Much warmth,
 
 
 Murray
 
 


-- 
bala balachandar muruganantham
blog lynx http://chandar.blogspot.com
web http://www.chennaishopping.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Any alternative to POST method FTP uploads from client computer?

2005-05-08 Thread Murray @ PlanetThoughtful
 Hi,
 
 On 5/9/05, Murray @ PlanetThoughtful [EMAIL PROTECTED] wrote:
  Hi All,
 
  I need to implement the ability to ftp upload files from client machines
 via
  a form in a web application I'm developing.
 
  From reading the PHP help, all I can find to perform this is the POST
 method
  for handling file uploads
  (http://au2.php.net/manual/en/features.file-upload.php).
 
  From my perspective, while this seems to work, there are a couple of
  drawbacks, most important of which is that it seems you can only do
  comparisons of the uploaded file, against the potential that the file
 has
  already been uploaded, once the file has already been uploaded and is
  sitting in the server temp directory.
 
 Instead use the dynamic file names
 
 say you upload a file filename.jpg
 
 when u upload it name it dynamiccaly by appending date and time before
 the file name
  like this
 
 2005050501010-filename.jpg

Hi, yes, I'm already doing this. Conflict of filename isn't my issue -- it's
whether or not the file should be uploaded at all, in the first place.

The difficulty being that you can't examine the file until *after* it has
been uploaded.

As others have suggested, using an ftp client application is one way to
handle it, however, users being users, the feedback has been Why do we need
to upload the files via an ftp client, *then* go to the web application and
attach the filename to a job entry? Why can't we do it all at once?

The answer being, Well, you can, but I bet you're going to be even more
annoyed when you've uploaded a huge file via the web application using the
POST upload method, only to find that the file is already there. Serves you
right for having too many stakeholders in uploading the files, dunnit?

Sometimes, you just can't win. Not that I don't understand the
practicalities involved, but this one feature would have been nice.

Regards,

Murray

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php