Need to show file open dialog in web client

Hi All,

In web based application , How to select a file

I have used,

  1. var file = plugins.file.showFileOpenDialog();
    is not working on WebClient

  2. var file = application.showFileOpenDialog();
    this also not working on Webclient

Can any one suggest an alternate way to achieve this

Thanks in advance

Browsers in general do not allow you to access anything on the client machine.

The only way to to “open” a file from the client machine in a webbrowser is to first upload it and then stream it back to the client.

To upload a file, you need to place a field with display_type = “image_media” on your form. If the field is editable, in the Webclient, it will have an Upload and Save button displayed int he field with which you can upload a file.

As for how to stream a file back from the server to the client: Have a look on the forum. I think there are multiple topics on that.

Paul

As for how to stream a file back from the server to the client

Have a look here: http://www.it2be.com/plugins.htm#datastream

Thanks Paul and Marcel ,
I will try using a field with display_type = “image_media”
then will try to stream the file back from server to client.

But, I have to check the file type(only .doc and .pdf file is accepted)
also I need to copy the file to a specified folder.