I'm sending data as http PUT request. Using Postman I have chosen form-data
as option to send data as I want to send(upload) file as well,along with other necessary data.
I have chosen a csv file and a field with name(key) as "asd". In output window data is displayed as below :
So my question is : how to retrieve or receive the data in codeigniter 3 with key name asd
and input type file's key name fil
?
I tried:
$this->input->raw_input_stream('asd');
$this->input->raw_input_stream('fil');
But it didn't work.
------WebKitFormBoundaryNXgITT259B576h8U
Content-Disposition: form-data; name="asd"
zxxxxxxxxxxxx
------WebKitFormBoundaryNXgITT259B576h8U
Content-Disposition: form-data; name="fil"; filename="utility_type.csv"
Content-Type: text/csv
Uid,Description,Modified
3,"Water and Sewer","2009-10-08 20:49:46"
2,"Combined Services","2014-07-29 14:50:32"
4,Electric,"2011-08-30 20:12:52"
5,"Natural Gas","0000-00-00 00:00:00"
6,Cable/Internet,"2015-06-10 17:47:51"
7,"Solid Waste/Trash Collection","2009-07-09 21:19:38"
30,Sewer,"2012-05-28 11:57:32"
80,Water,"2016-10-26 17:09:57"
------WebKitFormBoundaryNXgITT259B576h8U--