Estoy tratando de cargar una foto en vuejs y obtenerla en laravel para enviarla a s3 desde aws.
Cuando subo la foto a través de Insomnia, sube correctamente, pero cuando la subo a través de vuejs, regresa vacía.
const ob = new FormData(); ob.append("picture", this.file); const res = await this.$http.post('/members', ob, { headers: { 'Content-Type': 'multipart/form-data' } }); public function getUrlS3($foto){ $s3Client = new S3Client([ 'region' => 'us-east-1', 'version' => '2006-03-01', ]); $result = $s3Client->putObject([ 'Bucket' => 'bucket-name', 'Key' => 'file' . '.png', 'ACL' => 'public-read', 'SourceFile' => $foto, 'r' ]); return $result; } $aws = new S3Controller(); $file = $request->file('picture'); $rt = $aws->getUrlS3($file); Content-Disposition: form-data; name="picture"; filename="chiru.jpeg" Content-Type: image/jpeg