I have a series of functions to handle file uploads; validating the uploaded file (checking size, type etc) then sending the uploaded file to Cloudfiles - this all works fine.
I would like to use the same functions for saving local files (files previously uploaded and saved to the webserver) to Cloudfiles.
Is it possible to open the local file as if it had just been uploaded i.e. in the format:
array(
'name' => '',
'type' => '',
'tmp_name' => '',
'error' => '',
'size' => ''
);
I'm guessing I will need to manually recreate this structure - if so, how would I save the file contents?
Alternately, should I be changing my existing validation functions to receive file data in a different format?