Reading file contents

Hi,

How to read the content of uploaded file (pdf). Is there any File Read stream available?

My requirement is :

1. I will upload PDF file along with some textual data

2. And send this to external system via web api

something like below C/C++/Java code 

$fp = fopen($file, 'r');
$upload_file_contents = fread($fp, filesize($file));

{
"File" => $upload_file_contents,
"File-Name" => 'test323.pdf',
"Mime-Type" => 'application/pdf'

}

Thanks!

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data