Private File Upload
Build on Spring Cloud & AWS S3
Table of Contents
About The Project
Built With
- Spring Boot
- Spring Cloud
- AWS S3
- ☕️ & ❤️
Getting Started
Prerequisites
In order to run this application you should have an Amazon Web Services (AWS) account.
Installation
- Update the
application.yamlsettings value forcloud.aws.credentials.profile-nameto the name of your local AWS-profile - run
./gradlew bootRun - Open your browser at
localhost:8080
Usage
The application wraps a lot of S3-related API calls in easy to use UI elements to
- create/delete buckets (mapped as "spaces" so we can give them non-unique names)
- upload/delete files
- make files public/private
- create pre-signed URLs for files
- create bucket policy rules to set the lifecycle duration for elements
More detailed instructions can be found here:
🪣 Create a bucket
- Navigate to the Spaces section
- Click on New Space
- Enter the name and click Submit
- A message should pop up to indicate success
🗂 Upload a File
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Click on Upload File
- Pick our file, provide a name and click Submit
- A message should pop up to indicate success
🔎 List all Objects in a Bucket
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- You see a list of all objects stored in the bucket
🌐 Get an Object's URL
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Select Download on the target object
- The object's URL shall be opened in a new tab
📢 Make an object public
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Select Make Public on the target object
- A message should pop up to indicate success
🤫 Make an Object private
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Select Make Private on the target object
- A message should pop up to indicate success
🔥 Delete an Object
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Select Delete on the target object
- The list of objects should reload without the deleted one
☄️ Delete a Bucket
- Navigate to the Spaces section
- Select Delete on the target Space/Bucket
- The list of buckets should reload without the deleted one
👾 Generate a pre-signed URL
- Navigate to the Spaces section
- Select Details on the target Space/Bucket
- Select Magic Link on the target object
- A message should pop up, containing a pre-signed URL for that object (which is valid for 15 minutes)
⏳ Set Expiration on Bucket
- Navigate to the Spaces section
- Select Make Temporary on the target Space/Bucket
- Select Delete on the target object
- A message should pop up to indicate success
Contact
Joshua Görner - jgoerner - joshua.goerner[at]gmail.com

