Skip to content

Commit 1ae3844

Browse files
committed
docs: update README
1 parent b3c4146 commit 1ae3844

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ For example `http://localhost:4000/work?limit=1000` will compute the first 1000
1616

1717
- **`/upload`**: Recieves the file in the POST request form field. Creates a temporary file with a unique name in the `./uploads` directory using `os.CreateTemp` and copies the file to it using `io.Copy()`. Renames the temp file using os.Rename() with a safe name created by a helper method in the format `./uploads/uuid_originalFileName.extension`. `uuid` is a unique ID generated by `google/uuid` to maintain unique file names. Performs clean up when the function returns.
1818

19-
- **`/download`**: Recieves the file name from the incoming request's `file` query. Checks if the file exists, using `os.Stat()`. If the file exists, it uses `http.ServeFile()` to send the file the client.
19+
- **`/download`**: Recieves the file name from the incoming request's `file` query. Checks if the file exists, using `os.Stat()`. If the file exists, it uses `http.ServeFile()` to send the file to the client.
2020

2121
### Middlewares:
2222
- **`AuthMiddleware()`**: protects the endpoints and returns 401 if the Basic Auth credentials are invalid. The password has been hardcoded because this is just a practice/learning project and I wanted to focus on other important concepts such as file uploading and downloading.

0 commit comments

Comments
 (0)