Open/Save file from web client

Forum to discuss the Web client version of Servoy.

Re: Open/Save file from web client

Postby Marco R. » Thu Apr 23, 2009 2:06 pm

i've just done it johan,thanks for your help



Marco
Marco Rossi
Freelance

Main development environment: Servoy 6.1.6 - 7.4.3, Java 1.6u45,7u71 Windows 7/CentOS
Marco R.
 
Posts: 203
Joined: Thu Mar 19, 2009 12:37 pm

Re: Open/Save file from web client

Postby Andrei Costescu » Thu May 07, 2009 10:28 am

The remaining use cases related to name&type fields are implemented.
Starting with Servoy 4.1.3 image/media fields in both smart and web client will populate "x_filename" and "x_mimetype" in case of upload(load) and use them in case of download(save) - where "x" is a media dataprovider.
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: Open/Save file from web client

Postby gregborn » Tue Sep 22, 2009 7:47 pm

Is there a way to "Load" a media file without having the user click the little icon in a media field?

In Servoy 4.1.x web-client only I'd like to be able to have a button other than one that sits between two other small icons in a media field. The UI for how this looks when deployed is the primary issue. The acts of saving and/or removing an image aren't needed... I just want to trigger the opening of the client's file picker dialog box and let them choose what to upload.

Greg
gregborn
 
Posts: 6
Joined: Tue Aug 15, 2006 4:26 pm

Re: Open/Save file from web client

Postby jcompagner » Wed Sep 23, 2009 10:55 am

there is currently no other way for a user to upload files.
Make a feature request if you want more options.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Open/Save file from web client

Postby gregborn » Wed Sep 23, 2009 3:34 pm

Feature request 244315 added this morning.
Greg Born
adBlocks
gregborn
 
Posts: 6
Joined: Tue Aug 15, 2006 4:26 pm

Re: Open/Save file from web client

Postby Marco R. » Thu Sep 24, 2009 11:14 am

Hi,


Greg have you asked only for upload button or else for the other?
And one more for Johan: When you will solve the issue:Will you put some events like: onUpload or similar?

Marco
Marco Rossi
Freelance

Main development environment: Servoy 6.1.6 - 7.4.3, Java 1.6u45,7u71 Windows 7/CentOS
Marco R.
 
Posts: 203
Joined: Thu Mar 19, 2009 12:37 pm

Re: Open/Save file from web client

Postby Harjo » Thu Sep 24, 2009 11:58 am

I think the bottomline is here, that we would like to have some more control, about webupload & download.

I know, we can already, catch the filename & mimetype.
but we can't create or own buttons/design, for this and can't create methods, so we can script up & downloads by web, right?

This would have my vote! ;-)
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Open/Save file from web client

Postby Westy » Thu Sep 24, 2009 8:15 pm

Harjo wrote:I think the bottomline is here, that we would like to have some more control, about webupload & download.

I know, we can already, catch the filename & mimetype.
but we can't create or own buttons/design, for this and can't create methods, so we can script up & downloads by web, right?

This would have my vote! ;-)

I second that motion!

Dean Westover
Westy
 
Posts: 852
Joined: Fri Feb 13, 2004 5:27 am
Location: Lynnfield, Massachusetts USA

Re: Open/Save file from web client

Postby bobcusick » Mon Sep 28, 2009 6:16 am

Harjo wrote:I think the bottomline is here, that we would like to have some more control, about webupload & download.

I know, we can already, catch the filename & mimetype.
but we can't create or own buttons/design, for this and can't create methods, so we can script up & downloads by web, right?

This would have my vote! ;-)


+1 on this!
User avatar
bobcusick
 
Posts: 126
Joined: Mon Jan 12, 2009 9:13 pm

Re: Open/Save file from web client

Postby erdione » Mon Sep 28, 2009 8:04 am

Harjo wrote:I think the bottomline is here, that we would like to have some more control, about webupload & download.

I know, we can already, catch the filename & mimetype.
but we can't create or own buttons/design, for this and can't create methods, so we can script up & downloads by web, right?

This would have my vote! ;-)


+1
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: Open/Save file from web client

Postby Harjo » Mon Sep 28, 2009 8:22 am

oke, thanks for the vote, but did any of us, filed a request? ;-)
I'm not sure, so I did, with a pointer to this topic: feature request: 245204
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Open/Save file from web client

Postby jcompagner » Tue Dec 22, 2009 6:39 pm

i looked into this a bit more
and it is just not really doable in the webclient because of security constraints
for example it is not possible that you place a button on a form where you then say "showFileInputdialog" on
thats impossible to do in a webclient because of security constraints

The user must click on something them self and that something must then open it right away in the browser and that is doable with a upload field
or with a flash thing like google uses for its upload.
But a user client action is always needed.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Open/Save file from web client

Postby Harjo » Tue Dec 22, 2009 9:07 pm

Johan, is it possible to only make or own method, that opens the upload window, that Servoy now is already using? and THAN users push that button, to browse a file?

so we dont have to use, the media-field, with there (IMHO ugly ;-) ) buttons?
Harjo Kompagnie
ServoyCamp
Servoy Certified Developer
Servoy Valued Professional
SAN Developer
Harjo
 
Posts: 4321
Joined: Fri Apr 25, 2003 11:42 pm
Location: DEN HAM OV, The Netherlands

Re: Open/Save file from web client

Postby jcompagner » Tue Dec 22, 2009 11:17 pm

I think we could map the openfiledialog in the file plugin to open up that upload window.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Open/Save file from web client

Postby jcompagner » Tue Dec 29, 2009 6:42 pm

ok for 5.1 i improved the file plugin for the web.

showFileDialog() can now have a callback function as (extra) parameter
when you give that in the web it will open up a Dialog where a user can select a file
then the call back method will get that file back.

also readTXTFile() or readFile() are supported in the web if you give a JSFile (that you get from the showFileDialog callback method)


Also writeFile, writeTXTFile and writeXMLFile methods are now supported in the web

as an example:

Code: Select all
function openFileDialog(event)
{
   plugins.file.showFileOpenDialog(0,"",false,null,uploaded);
}
function uploaded(files)
{
   media = files[0].getBytes();
}


also the fileupload dialog is now a modal ajax dialog so it is much nicer to work with.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8839
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

PreviousNext

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 4 guests