Closed trendchaser4u closed 6 years ago
Hi,
it's same but images can be processed ImageMagick or GraphicsMagick --> image.save()
. Uploading is very easy https://github.com/totaljs/examples/tree/master/upload-multipart
yeah but it save files in tmp dir :( i need to upload to public dir.
Files are saved in tmp, but they are removed after you close a controller. You can use: https://docs.totaljs.com/latest/en.html#api~HttpFile~file.move
function some_upload_action() {
var self = this;
self.files[0].move(F.path.public('myfile.jpg'), function() {
self.json({ success: true });
});
}
yup !! got it... thanks a lot!! you are awesome :) :+1:
This is not actually an issue. Kind of suggestion to a proper way of implementing upload files (different formats) to the server.
Using total.js 3.0.0
Note: In documentation, I could only find a way to save(upload) images with image.save() method.