Skip to content

Commit e85253f

Browse files
authored
Update README.md
1 parent 8423af3 commit e85253f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,16 +177,20 @@ public func routes(_ router: Router) throws {
177177

178178
let s3 = try req.makeS3Client()
179179
do {
180+
// Upload a file from string
180181
return try s3.put(string: string, destination: fileName, access: .publicRead, on: req).flatMap(to: String.self) { putResponse in
181182
print("PUT response:")
182183
print(putResponse)
184+
// Get the content of the newly uploaded file
183185
return try s3.get(file: fileName, on: req).flatMap(to: String.self) { getResponse in
184186
print("GET response:")
185187
print(getResponse)
186188
print(String(data: getResponse.data, encoding: .utf8) ?? "Unknown content!")
189+
// Get info about the file (HEAD)
187190
return try s3.get(fileInfo: fileName, on: req).flatMap(to: String.self) { infoResponse in
188191
print("HEAD/Info response:")
189192
print(infoResponse)
193+
// Delete the file
190194
return try s3.delete(file: fileName, on: req).map() { response in
191195
print("DELETE response:")
192196
print(response)

0 commit comments

Comments
 (0)