@Joas:
It works,Thanks Joas!
@jcompagner:
Yes is the c: drive of smart client(for now I need only to choose the way that I have to take)
For who is reading this topic:
I have token another way because I have to work both with local and with remote files..I have token the related JSFile of myImage.jpg(using convertToRemoteJSFile) and I have convert it into a JSImage object by the code:
- Code: Select all
var _file = plugins.file.convertToRemoteJSFile('/site_off.jpg')
plugins.images.getImage(_file.getBytes())
After this I have resized the JSImage to create a miniature.
I have a new question: what is the best way to send the new miniature-image to the remote folder(/uploads)?
At now I'm using:
- Code: Select all
plugins.file.writeFile('c:/mymini.jpg',_image.getData())
var _newFile = plugins.file.createFile('c:/mymini.jpg')
plugins.file.streamFilesToServer(_newFile,'/mymini.jpg',null)
plugins.file.deleteFile('mymini.jpg')
But I like to jump the "writeFile" passage and stream the new miniature directly on the server..
My problem is that the miniature is a JSImage object..How can I convert it into a JSFile without write it first?