Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

366
Views
upload images in vuejs to laravel (aws s3)

I'm trying to upload a photo in vuejs and get it in laravel to send to s3 from aws.

When I upload the photo through Insomnia it uploads correctly, but when I upload it through vuejs, it returns empty.

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

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!