Page 1 of 1

How does streamFilesFromServer works?

PostPosted: Wed Oct 20, 2010 10:27 am
by Marco R.
Hi all,

This post is similar to another but this time I have to reimport the file from server to client(smart and web).

I have tried with this kind of function call:
Code: Select all
1 - plugins.file.streamFilesFromServer(pathLocalFileName,"claims.servoy",globals.dmo_utl_fileShowErr)
2 - plugins.file.streamFilesFromServer(pathLocalFileName+"\"+fileNameWithFileExtension,fullPathInWichIFoundFileOnServerWithFileNameFileExtension,globals.functionCheckErr)
3 - plugins.file.streamFilesFromServer(pathLocalFileName+"\\"+fileNameWithFileExtension,fullPathInWichIFoundFileOnServerWithFileNameFileExtension,globals.functionCheckErr)
4 - plugins.file.streamFilesFromServer(pathLocalFileName+"/"+fileNameWithFileExtension,fullPathInWichIFoundFileOnServerWithFileNameFileExtension,globals.functionCheckErr)



I have tried all kind of separator(\,/,\\ to make the string solve the special char) but nothing work.

Another thing is : if I try to inspect the function NULL is returned,in add the global call back function is never called.

In my specific case the remotePath and the remoteFileName and remoteFileExstension are knowed,I want only allow the user to choose where save the file(by plugins.file.showFileOpenDialog).
The other function (plugins.file.streamFilesToServer(file,null,globals.functionCheckErr) works fine.

Can you show me please how can I make it work(with an example of a single file transfer)

Thanks in advance



Marco

Re: How does streamFilesFromServer works?

PostPosted: Wed Oct 20, 2010 3:39 pm
by ptalbot
Marco (and all),

maybe this: http://www.servoyforge.net/news/43 will help you understand how the file plugin "streamFiles" to and from options work?

Cheers,

Re: How does streamFilesFromServer works?

PostPosted: Wed Oct 20, 2010 6:16 pm
by Marco R.
Hi Patrick!

I hope we don't make you crazy with our questions :D

However ,thank you and thank to your partners for the sample! I have solved my import problem.I was trying to point on "c:\myFolder" when the server default path was the default (/uploads).
There is a proverb that says: "There’s nothing more elusive than an obvious fact!" :mrgreen:

regards

Re: How does streamFilesFromServer works?

PostPosted: Wed Oct 20, 2010 6:51 pm
by ptalbot
Hi Marco, glad it works for you in the end!

I also thought: there's nothing better than a good example ;)