cURL / Mailing Lists / curl-users / Single Mail

curl-users

upload to browser

From: Magnus Stålnacke <jemamo_at_telia.com>
Date: Sun, 20 Feb 2005 15:47:07 +0100

I am thinking about making a script to upload images to
a photo-devoloper site
(http://www.order.proprint.se/upload2.php)

Problem is, after the upload i need to be able to use my ordinary
browser with the same cookie containing a session id as set
from the upload.

The site works like this: one is supposed to upload one file at the
time (they also have a java upload method that doesent work reliably),
after every upload the server sends back a thumbnail of the picture as
confirmation, when all pics are uploaded one klicks to go to the next
page (select.php) where all thumbnails are shown again with some
individual choises to every image (this part has to be done with a
graphical browser, you have to see what you are doing).

So, is it possible to make a bash script that uses curl for
this, i can imagine something like:

for i in *.jpg; do
 curl -F upload=@$i www.order.proprint.se/uploader.php
done

But how could i handle the needed cookie and then, with the
script, fire up and pointing mozilla at www.order.proprint.se/select.php
using this cookie, and then take the rest "manually" with mozilla
from there?

Any ideas?

-- 
Software is not manufactured, it is something you write and publish. 
Keep Europe free from software patents, we do not want censorship 
by patent law on written works.
Received on 2005-02-20