Automatic File Download...

Hey, what I’m trying to do is to have my program allow the users to download documents and images straight to their home directory (or desktop) without having the file dialog popping up. the users will more than likely be downloading several files at once and I just want to be able to throw them right on their computer and i remembered in java there was some kind of function that would let me grab the users current home directory, but I’m not sure if thats possible in servoy.

thanks ahead of time for your help.

Short answer: YES.

Longer answer:

Use ```
plugins.file.getHomeDirectory()


To write a binary file (or variable) to disk use:

//Write binary file
var fileName = ‘c:/temp/out.dat’
var success = plugins.file.writeFile(fileName,mediafield);


Hope this helps.

that is exactly what i need! thank you so much!!