This commit is contained in:
Raven Scott 2024-09-19 01:39:34 -04:00
parent e718252f74
commit b13ce5ca0c

View File

@ -2149,10 +2149,15 @@ app.post('/', multer({ dest: "uploads/" }).single('myFile'), (req, res) => {
``` ```
#### Step-by-Step Process: #### Step-by-Step Process:
**Receive File**: The file is uploaded to a temporary directory. **Receive File**: The file is uploaded to a temporary directory.
**Verify Key**: The server checks the provided key to ensure the upload is authorized. **Verify Key**: The server checks the provided key to ensure the upload is authorized.
**Check Container**: The server checks if the container exists and is running. **Check Container**: The server checks if the container exists and is running.
**Copy File**: If everything checks out, the file is copied to the users container using `docker cp`. **Copy File**: If everything checks out, the file is copied to the users container using `docker cp`.
**Cleanup**: The temporary file is removed from the server after the upload is complete. **Cleanup**: The temporary file is removed from the server after the upload is complete.
#### Example Output: #### Example Output: