Create File and Write File
Posted: Tue Sep 02, 2014 2:56 pm
Hi All,
I'm trying to create a file on the server. And then transfer it via ftp. The first part of the code is:
Where _files[0] is the array containing the array of images (files);
My issue is, at the time of completion i see the status as "loading" and then "server error". The file gets transferred to the ftp location. However it is corrupted.
Any ideas?
Regards,
Hareendra
I'm trying to create a file on the server. And then transfer it via ftp. The first part of the code is:
- Code: Select all
var _server_file = plugins.file.createFile("myimage.jpg");
_success = plugins.file.writeFile(_server_file, _files[0].getBytes());
Where _files[0] is the array containing the array of images (files);
My issue is, at the time of completion i see the status as "loading" and then "server error". The file gets transferred to the ftp location. However it is corrupted.
Any ideas?
Regards,
Hareendra