I have VBA code for upload files in binary code, laravel API save files in database. the problem is storing in the database.
VBA send file in binary code (visible in debug.print): S09EIG5hIHByZXZvZCBzb2JvcnUgbmEgYmluYXJuaSBzb3Vib3IKClByaXZhdGUgRnVuY3Rpb24gcHZQb3N0RmlsZShzVXJsIEFzIFN0cmluZywgc0ZpbGVOYW1lIEFzIFN0cmluZywgT3B0aW9uYWwgQnlWYWwgYkFzeW5jIEFzIEJvb2xlYW4pIEFzIFN0cmluZwogIENvbnN0IF...
but in database have saved this: /tmp/phpwMsw7p
laravel controller:
function dataInsert(Request $request)
{
$user=new User();
$user->file_attachment=$request->file_attachment;
return $user->save();
}
Did i missed something ?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire