View more context

 

Tamara

Hi all, I'm drawing a blank. What's the best way to create a File object (and save a generated file into that)?

phyzical

(cheatt and look at the savInto of upload field ) 😛

dorsetdigital

Once you have a file object ($myFile = File::create();) You can use the ->setFromLocalFile(), ->setFromString() or ->setFromStream() methods to get the data into it.

👍 (1)