{"version":"1.0","type":"rich","title":"upload photo to AWS S3 server and generate an URL","description":"This example demonstrates how to upload a photo file to an Amazon Web Services S3 bucket and generate a public URL for the uploaded object. The code uses the AWS SDK for JavaScript, specifically the `S3` client’s `upload` method, along with the `fs` module to read the local file. It shows the asynchronous flow of configuring bucket parameters, performing the upload, and then logging the resulting `Location` URL from the returned data. The sample relies on environment variables for credentials and bucket configuration, and it includes error handling to catch and print any upload failures.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-37386757efbf90098d0de08e7097f482?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}