OneChan Drive was born because below story.
- OneDrive causes auto-launched when started up PC.
- To hinder it, I renamed OneDrive's binary file name to
OneChanDrive.exe
with humor. - I like that name. So I started this project.
To run the server, use the following command:
cargo run
The server will start at http://localhost:8000
.
-
URL:
/upload/<file_name>
-
Method:
POST
-
Description: Upload a file with the specified file name.
-
Example:
curl -X POST --data-binary @hello.txt http://localhost:8000/upload/hello.txt
-
URL:
/download/<file_name>
-
Method:
GET
-
Description: Download the file with the specified file name.
-
Example:
curl -O http://localhost:8000/download/hello.txt
-
URL:
/files
-
Method:
GET
-
Description: List all uploaded files.
-
Example:
curl http://localhost:8000/files
-
URL:
/delete/<file_name>
-
Method:
DELETE
-
Description: Delete the file with the specified file name.
-
Example:
curl -X DELETE http://localhost:8000/delete/hello.txt