What I still don’t get is how to save files to a local drive.
By pressing the SAVE button [attachment=0]SaveOpenDel.JPG[/attachment]
my browser opens a PREVIEW window and not a SAVE DIALOG window.
Is there a way to change this behavior ? It depends on browser’s settings ?
I save xls, doc, image files, pdf, msg (emails) … various file types that are inherent with the management of quality complains.
Up to now my application accepts any file.
Note:
when testing all that staff with the developer / web client, everything works as the smart client.
i’ve the same problem.
i work with sevoy 4.1.2 and need to save an attach from the db by the webclient.
the step that i follow are:
1- i have an mp3 into my db (with other file that doesn’t allow a preaview work in the same mode)
[attachment=2]mp3 prima.JPG[/attachment]
2 - then i click on floppy image and appear the save-browser-dialog(mozilla,ie7 work like this)
[attachment=1]mp3 seconda dialog salvataggio.JPG[/attachment]
3 - at last i choose to save my file by click on “save” button but the result is a file with bad filename and bad extension
[attachment=0]mp3 terza nome.JPG[/attachment]
if i rename the file it work properly then it isn’t corrupted.
into my db there are the field in wich are stored filename and filetype,i’ve done this following Johan’s instructions too.
p.s. exist into servoy 4.1.2 a way to retrive DESKTOP path.
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.
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 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?
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?
Harjo:
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?
Harjo:
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?
Harjo:
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?
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, 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?
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:
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.