|
| 1 | +<!-- PROJECT LOGO --> |
| 2 | +<br /> |
| 3 | +<p align="center"> |
| 4 | + <img src="images/logo.png" alt="Logo" width="80" height="80"> |
| 5 | + <h3 align="center">Private File Upload</h3> |
| 6 | + |
| 7 | + <p align="center"> |
| 8 | + Build on Spring Cloud & AWS S3 |
| 9 | + </p> |
| 10 | +</p> |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +<!-- TABLE OF CONTENTS --> |
| 15 | +## Table of Contents |
| 16 | + |
| 17 | +* [About the Project](#about-the-project) |
| 18 | + * [Built With](#built-with) |
| 19 | +* [Getting Started](#getting-started) |
| 20 | + * [Prerequisites](#prerequisites) |
| 21 | + * [Installation](#installation) |
| 22 | +* [Usage](#usage) |
| 23 | +* [Contact](#contact) |
| 24 | +* [Acknowledgements](#acknowledgements) |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +<!-- ABOUT THE PROJECT --> |
| 29 | +## About The Project |
| 30 | + |
| 31 | +<p align="center"> |
| 32 | + <img src="images/usage.gif"> |
| 33 | +</p> |
| 34 | + |
| 35 | + |
| 36 | +### Built With |
| 37 | +- Spring Boot |
| 38 | +- Spring Cloud |
| 39 | +- AWS S3 |
| 40 | +- ☕️ & ❤️ |
| 41 | + |
| 42 | +<!-- GETTING STARTED --> |
| 43 | +## Getting Started |
| 44 | + |
| 45 | +### Prerequisites |
| 46 | + |
| 47 | +In order to run this application you should have an Amazon Web Services (AWS) account. |
| 48 | + |
| 49 | +### Installation |
| 50 | + |
| 51 | +1. Update the `application.yaml` settings value for `cloud.aws.credentials.profile-name` to the name of your local AWS-profile |
| 52 | +2. run `./gradlew bootRun` |
| 53 | +3. Open your browser at `localhost:8080` |
| 54 | + |
| 55 | +<!-- USAGE EXAMPLES --> |
| 56 | +## Usage |
| 57 | + |
| 58 | +The application wraps a lot of S3-related API calls in easy to use UI elements to |
| 59 | + |
| 60 | +- create/delete buckets (mapped as "spaces" so we can give them non-unique names) |
| 61 | +- upload/delete files |
| 62 | +- make files public/private |
| 63 | +- create pre-signed URLs for files |
| 64 | +- create bucket policy rules to set the lifecycle duration for elements |
| 65 | + |
| 66 | +More detailed instructions can be found here: |
| 67 | + |
| 68 | +<details> |
| 69 | + <summary>🪣 Create a bucket</summary> |
| 70 | + |
| 71 | +1. Navigate to the _Spaces_ section |
| 72 | +2. Click on _New Space_ |
| 73 | +3. Enter the name and click _Submit_ |
| 74 | +4. A message should pop up to indicate success |
| 75 | + |
| 76 | +</details> |
| 77 | + |
| 78 | +<details> |
| 79 | + <summary>🗂 Upload a File</summary> |
| 80 | + |
| 81 | +1. Navigate to the _Spaces_ section |
| 82 | +2. Select _Details_ on the target Space/Bucket |
| 83 | +3. Click on _Upload File_ |
| 84 | +4. Pick our file, provide a name and click _Submit_ |
| 85 | +5. A message should pop up to indicate success |
| 86 | +</details> |
| 87 | + |
| 88 | +<details> |
| 89 | + <summary>🔎 List all Objects in a Bucket</summary> |
| 90 | + |
| 91 | +1. Navigate to the _Spaces_ section |
| 92 | +2. Select _Details_ on the target Space/Bucket |
| 93 | +3. You see a list of all objects stored in the bucket |
| 94 | +</details> |
| 95 | + |
| 96 | +<details> |
| 97 | + <summary>🌐 Get an Object's URL</summary> |
| 98 | + |
| 99 | +1. Navigate to the _Spaces_ section |
| 100 | +2. Select _Details_ on the target Space/Bucket |
| 101 | +3. Select _Download_ on the target object |
| 102 | +4. The object's URL shall be opened in a new tab |
| 103 | +</details> |
| 104 | + |
| 105 | +<details> |
| 106 | + <summary>📢 Make an object public</summary> |
| 107 | + |
| 108 | +1. Navigate to the _Spaces_ section |
| 109 | +2. Select _Details_ on the target Space/Bucket |
| 110 | +3. Select _Make Public_ on the target object |
| 111 | +4. A message should pop up to indicate success |
| 112 | +</details> |
| 113 | + |
| 114 | +<details> |
| 115 | + <summary>🤫 Make an Object private</summary> |
| 116 | + |
| 117 | +1. Navigate to the _Spaces_ section |
| 118 | +2. Select _Details_ on the target Space/Bucket |
| 119 | +3. Select _Make Private_ on the target object |
| 120 | +4. A message should pop up to indicate success |
| 121 | +</details> |
| 122 | + |
| 123 | +<details> |
| 124 | + <summary>🔥 Delete an Object</summary> |
| 125 | + |
| 126 | +1. Navigate to the _Spaces_ section |
| 127 | +2. Select _Details_ on the target Space/Bucket |
| 128 | +3. Select _Delete_ on the target object |
| 129 | +4. The list of objects should reload without the deleted one |
| 130 | +</details> |
| 131 | + |
| 132 | +<details> |
| 133 | + <summary>☄️ Delete a Bucket</summary> |
| 134 | + |
| 135 | +1. Navigate to the _Spaces_ section |
| 136 | +2. Select _Delete_ on the target Space/Bucket |
| 137 | +3. The list of buckets should reload without the deleted one |
| 138 | +</details> |
| 139 | + |
| 140 | +<details> |
| 141 | + <summary>👾 Generate a pre-signed URL</summary> |
| 142 | + |
| 143 | +1. Navigate to the _Spaces_ section |
| 144 | +2. Select _Details_ on the target Space/Bucket |
| 145 | +3. Select _Magic Link_ on the target object |
| 146 | +4. A message should pop up, containing a pre-signed URL for that object (which is valid for 15 minutes) |
| 147 | +</details> |
| 148 | + |
| 149 | +<details> |
| 150 | + <summary>⏳ Set Expiration on Bucket</summary> |
| 151 | + |
| 152 | +1. Navigate to the _Spaces_ section |
| 153 | +2. Select _Make Temporary_ on the target Space/Bucket |
| 154 | +3. Select _Delete_ on the target object |
| 155 | +4. A message should pop up to indicate success |
| 156 | +</details> |
| 157 | + |
| 158 | +<!-- CONTACT --> |
| 159 | +## Contact |
| 160 | + |
| 161 | +Joshua Görner - [jgoerner](https://www.linkedin.com/in/jgoerner/) - joshua.goerner[at]gmail.com |
| 162 | + |
| 163 | + |
| 164 | +<!-- ACKNOWLEDGEMENTS --> |
| 165 | +## Acknowledgements |
| 166 | +* [O. Drew](https://github.com/othneildrew/Best-README-Template) - nice GH Readme template |
| 167 | +* [Hatchful](https://hatchful.shopify.com/) - Easy Logo Generation |
0 commit comments