How to work with files?

Tavis Delahunt Posted in Component Development 2 months ago

I'm using OssnFile to create and upload images to the ossndata folder, and I am able to get the file object and retrieve the path with getPath(). Right now I'm using fileget_contents to display the image, but I feel like there must be an easier way. Am I missing something? Is there another, better way of doing this?

Replies
Indonesian Arsalan Shah Replied 1 month ago

Supposing you have file instance already

$file = ossn_get_file(id); //instance of file
$file->output();

Simply using output method