Solved

How send multiple files to clients computer?

Posted on 1998-09-06
16
180 Views
Last Modified: 2012-05-04
Using FrontPage98, Access, and ASP.
Prefer answer in VBScript..if not possible then something
else.

This is about delivering image-files over Internet.
The client have selected one or more images to download to his own computer (from the webserver).

When the client hit the submit-button in the ORDER-form, I
want that ALL the selected images shall be sent to one specific directory on the client's computer.
The images that the client ordered are stored in a commaseparated session-variable (with all the unique image-ID's). So when the Client hit the submit-button I want to activate code in an ASP-page, find all the related records in the Access DB, get the image-path for each Image, and
send each Image-file to the directory on the client's computer. The files must be sent one by one. And I have to be sure that each file did reach the destination.

This seems to be a lot....but...
I only want the syntax of the code that get the downloading
of the files done, and eventually the error-handling code.
IMPORTANT...The user shall only click once to start downloading of all the files.

Depending of the work ..this question might be upgraded to
more points. Good luck.

Erot.
0
Comment
Question by:erot
  • 9
  • 3
  • 2
  • +2
16 Comments
 
LVL 28

Expert Comment

by:sybe
Comment Utility
If you send an image to a browser, and you use gif or jpg, the images will not be downloaded to a directory, but will be displayed in the browser (and stored in the browser's cache).

If you want the selected images to be downloaded in one run, I guess your best best is to create on the fly a zip file with the selected images and send that zip file.

In fact you are dealing with 2 things:
1. a server-side problem of sending the selected images, which is not so hard to solve, especially because you control the server and can install what you want on the server.
2. a client-side problem of receiving and storing the images. This is much harder to solve, because you don't have access to the client's computer.

I suggest that you treat those problems seperately, because they each need a different approach. It is imaginable that you will end up using java or ActiveX at the client side, or make use of another protocol then the HTTP (maybe FTP).

0
 
LVL 10

Expert Comment

by:MasseyM
Comment Utility
There is a server side component called ServerZip from Stonebroom Computers that will take the selections of a user, zip them into one zip file nad then send the images..  You can get a trial version from www.stonebroom.com or from www.wrox.com (look for the book Professional Active Server Pages 2.0 --> example code).

This looks like your best alternative.

0
 

Author Comment

by:erot
Comment Utility
The files that shall be downloaded are already compressed.
I MUST send the files ONE by ONE, and be able to check if the
files did download or not.
The files shall not be viewed in the client browser, but shall
be saved directly into a folder on the client computer.
The client shall choose which directory to download to, so
there will be no need to create new directories.
The ServerZIP are not available any more...from WROX...but can it solve the above problem.

Erot.
0
 

Author Comment

by:erot
Comment Utility
The ServerZip is not available anymore due to a bug/problem. !

Is there any other way to solve the problem....and please read
my previous comment regarding my question.

Erot.
0
 

Author Comment

by:erot
Comment Utility
Comment to Sybe's answer...
  Do you have any example code for pnt 1 and 2 in your answer?

Erot.
0
 

Author Comment

by:erot
Comment Utility
To sybe: Same as above...???!???!?!?!?!?
0
 
LVL 28

Expert Comment

by:sybe
Comment Utility
Ok, but first reject MasseyM's answer, and reopen the question.
0
 

Author Comment

by:erot
Comment Utility
The solution/object (serverZip) is not available any more.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Expert Comment

by:buzh
Comment Utility
I didn't catch if you wanted pre-made packages of pictures, or that the users select a number of pictures.. in any case, what you need is a page that does this :

<meta http-equiv="refresh" content="0; url=http://yoursite.foo/file.zip>

You need one for each file, ofcourse. This will cause sensible browser to start downloading it.
One more thing you should do is to have the browser open another window for that.. it's called window.open, but I don't remember the syntax. anyway, the rest should be easy.. :)
0
 

Author Comment

by:erot
Comment Utility
****** ARE YOU SERIOUS...,,??? THIS IS NOT AN ANSWER ******
0
 

Author Comment

by:erot
Comment Utility
To buzh...Sorry about the last comment!!! When I logged in
I did only see a comment from you telling "Text above", which
did'nt make any sense.
When I looked over the history I saw something quite different
answer from you....but do you have any example code, and
when the user starts the downloading he only clicks a submit-button. I want the code on the server to send the image-files, one by one and verifying each download (did the file actually download or not).

erot.


0
 

Expert Comment

by:buzh
Comment Utility
Well.. what you need is an asp/cgi/java/whateveryouprefer app that does it server-side. I'm not able to test any code I may produce right now, but what you need to do is this :
- make a <form> that has the user select what files to get.
then you need a script that..
- grabs the options of the form. (they're sent as paramters like this, ?name=value after whatever you put in <form action=
- generates html. this isn't as hard as it sounds.
- the html must open a separate browser window with the window.open function and the code I mentioned earlier

That should solve it. Sorry there's no more specific code, tho.
0
 

Author Comment

by:erot
Comment Utility
comments to buzh.
  As mentioned earlier I do not want to send any information
  about what files to download to the client machine. Which means
 
  I want it to work like this:
  a) the user click the submit-button.
  b) the submit-button is connected to an ASP-page with the
     'POST' option.
  c) the code in the ASP-page will know from a server-variable
     what images the client shall download.
     The code scans through an Access table (ODBC) and get
     each image's full path on the server.
  d) start to download an image to the client's machine. This
     could be on the following folder on the client: 'C:\temp'.
     
  e) check if the download went OK. If it did repeat point d) and
     e) untill there are no more images to download.

  What I'm interested in is how to solve point d) and e).
  Is this possible??? ...and if ...example code please.
  (is it possible to start the download process from the server?)

If there is example code to come...the points will be upgraded...

Erot
0
 

Expert Comment

by:buzh
Comment Utility
No, you cannot do this..
The only thing you can do is generate html to have the client do things automagically, like the http-equiv thing I mentioned. You cannot tell the client to do anything, it has to do it by itself.
What I suggest you do to solve problem d and e, is :
- Generate a list of the files to be sent and use the window.open/http-equiv to have the client download the file.
- Have a few buttons on the page that say "Did the file come through correctly? (y/n)".
- If the user presses yes, generate a page with the next filename. If no, redo from start.

This will ensure that the user gets the files. Also, you could make a system that enables the client to get the files (even multiple times) over a weeks time, so that you can be sure that the user gets what he pays(?) for.

HTH.
0
 
LVL 1

Accepted Solution

by:
neinei earned 90 total points
Comment Utility
Hmmm your question is very chalanging. But I try to solve the problems. Well, To download multiple file there are two choice :
1. All files will be downloaded
   You can save the file name in the Access database.
   When the client clicks Submit button, the cursor of the table can be moved (RS.MoveNext), and everyfiles can be downloaded
2. Some Files will be downloaded
   You have to show the files from database and attach the checkbox. When the client clicks Submit button, the proper files will be downloaded.

And about checking the downloaded files, you can generate JavaScript (not JScript) that running on the client computer, checking the filename and size, every one of the downloaded files is downloaded. The JavaScript must show the button that indicating all files have been downloaded, and the client must click the button. The button has an event that is going to send a message to the server e-mail.

Wish you luck!!!
0
 

Author Comment

by:erot
Comment Utility
To NeiNei: Thank you for your answer...
   Can you provide me with some example code for point one
   and the JavaScript.
   
   Please let me know if you need more points and eventually
   how many.

   Erot. (sorry that this took some time have been on a vacation)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now