Upload image to AWS s3 storage from Laravel showed Heroku Server 500 Error

I've added


in Heroku and the according value to Heroku Config Vars.

Then, I uploaded image to '/images' folder on s3.

$path = $request->file('image')->store('/images', 's3');

After that, Heroku server showed the following error:

server error 500 title server error 500 specific

Is there anyone can help me explain what's going on? Thanks a lots. I'm trying figure out...


Here is my create.blade.php

<!DOCTYPE html>
<html lang="en">

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css"
        integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">

    <form action="/" method="POST" enctype="multipart/form-data">
        <input type="file" name="image" id="image">
        <button type="submit">Upload File</button>


Read more here: https://stackoverflow.com/questions/64951672/upload-image-to-aws-s3-storage-from-laravel-showed-heroku-server-500-error

Content Attribution

This content was originally published by Reggie at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: