PDA

View Full Version : upload an image to server


mohan
09-02-2003, 03:36 AM
Hai antun,

What is the basic principal behind getting an image from a user's computer uploaded to my laszlo server.

I have a directory on my laszlo server where I want the images from users. I have a file browse box:
<input type="file" name="file.1" tabindex="1"> on the form. (we can load the new html window using lzBrowser.loadURL('new html window'))

Now, the user can browse his machine for the image, using browse button ,once the user select the image,he is able to upload the image to the particular directory (ex:lps-v1/lz-utils/images) in the laszlo server.

How do I get this ?

with regards,
mallesh

antun
09-02-2003, 09:32 AM
I thought I answered this here:

http://www.laszlosystems.com/developers/community/forums/showthread.php?s=&threadid=360

You can't upload a file directly from the Flash client. On the other hand you don't want to submit the LZX page with an HTML form, because you'll get a page refresh.

What I would recommend is to have the upload be handled by a form in a separate page that you pop up in a small window using client-side JavaScript. That way the Laszlo app will remain in place, and the picture upload will not interfere with the user's experience.

-Antun

ebrentnelson
03-05-2006, 11:44 PM
What about FlashPlayer 8's new FileReference component? No functionality for that?

caclark
03-07-2006, 07:03 AM
Yes, you can. You can call most Flash stuff from Laszlo. However, the new Flash/DHTML combo picture viewer illustrates what sticking to Laszlo API gives you. If you call stuff that is not Laszlo API then you're pretty much screwed if you want to deploy to another runtime. If another runtime is not an issue, call all the Flash you want.

ebrentnelson
03-07-2006, 07:09 AM
Right. I found another post with great instructs how to do this. I had done it before in Flex so I figured it was possible in Laszlo.