Welcome! Log In Create A New Profile

Advanced

Upload several image files to the server (WbDev 12)

Posted by Victoria Caballero 
Victoria Caballero
Upload several image files to the server (WbDev 12)
November 06, 2008 09:46PM
Hi all!
In the last couple of days I've been trying to make a page where my users can upload some images to the server. This is the idea: in my web application I have a table of Products where there is a column with the name of the image for each product. My web application shows a list of products with their 'picture. All the pictures are saved in a folder on the server (I don keep them inside the table). So what I want to do is a page where the user can select the folder where there are the pictures of their products and just pressing a button upload all of them on the server. So I've been trying to do it without success. As fair as I see on the help the only way to do it is via an "Upload" edit control to select each image file from the source folder and then upload the image using the command "UploadCopyFile".
There is any other way to do what I want?????
Any suggestion or idea will be appreciated.
Thanks in advance.

Victoria Caballero

KenKnight
Re: Upload several image files to the server (WbDev 12)
November 07, 2008 05:15AM
Hi Victoria,

Oh the power of WinDev / Webdev shines!

Here's the solution I came up with. I wrote a Java Applet in WinDev that acts as a "Wizard" like interface. In my case, the applet allows them to select a directory on their local drive that holds the images, documents, spreadsheets and pdfs. When they hit the upload button, not only do I upload everything, I also verify the size of the images and optimize them for the web before uploading. This saves the hassle of people trying to upload the giant images that today's cameras produce.

You could just as easily have the java applet repeatedly do an http post with the image data. The http post would certainly need to authenticate and also pass in a parameter telling the server where to put the the images.

Bottom line is, if you can write in WinDev / WebDev you cna produce a java applet with WinDev to publish with WebDev. Below is a screenshot of the web page with the java applet in it. Once initialized you can't tell where the web page stops and the applet starts.



Cheers!
Ken


Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: