contoh Upload Guzzle CouchDB
function upload_gambar_tps()
{
$id_tps = id_tps_login();
//dd($id_tps);
$data_tps = cari_id2($id_tps);
//dd($data_tps);
$id = $data_tps["_id"];
$rev = $data_tps["_rev"];
$client = new Client();
$headers = [
'ContentType' => 'image/jpg',
'Content-Type' => 'image/png'
];
$fl = file_get_contents("http://localhost/QC2023/storage/app/data/c1.jpg");
//dd($fl);
//$body = '<file contents here>';
$body = $fl;
$request = new Request('PUT', '' . server() . '/' . $id . '/c2.jpg?rev=' . $rev . '', $headers, $body);
$res = $client->sendAsync($request)->wait();
$fix = $res->getBody();
dd($fix);
}
Lanjut Part : 1
Jam : 10:56:50
Durasi Part : 0:0:1
Durasi Total : 0:0:1
Punya Pertanyaan , Silahkan Whatsapp Langsung
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1
Muhammad Ullil Fahri
WA : 089696380422
Tautan WA : https://wa.me/message/SG4YA2XQP5FPE1