save an image via cgi
For a little kids-homepage I have written an applet, whithin you can "paint" with the mouse. But now I want to store the image on the server. There is a cgi-script I can call to upload a file (i.e. http://domain.com/cgi-bin/store.cgi?file=image.jpg). How can I do this from the applet? The problem is that I haven't a file "image.jpg" that I could send. In the applet there is only an Image-object. Is it possible to save the file via the cgi-script? Can anybody point me in the right direction?
I have no idea how to do it with a CGI script...however, you can do it with a servlet very easily by openning a stream with the applet and sending the file that way then writing it with the servlet. If that confused you too much, or you have no way to access servlets, ignore this message. Good luck.
Thanks for your answer. I'll try to use a simple client-server solution for this problem. This seems to be the easyest (and fastest) way.