- Clone the repository
- Start Redis server by calling command:
- Before starting Redis server install the redis application
- redis-server
- Now run local server on terminal by calling:
- go run cmd/main.go
- Open Postman or any other application to run API (POST request):
- localhost:8080/upload
- In body attach the file to be uploaded.
- Sample Response for successful upload
{ "message": "File uploaded and processed successfully" }
- To retrieve the data of the uploaded file call (GET request):
- *localhost:8080/file/{filename}
- Sample Response for successful request
{ "filename": "sample.txt", "file_size": 23 }
- You can enable redis cli and check the result:
- redis-cli
- GET {file_name} for ex: GET sample.txt
- Which returns the size of the file.
- Sample response: "23"
- To Run Test Cases:
- Run local server and redis
- Enter go test ./internal/handler/routes_test.go
-
Notifications
You must be signed in to change notification settings - Fork 0
madhusgowda/file-processing
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published