Skip to content

madhusgowda/file-processing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

File Processing

  1. Clone the repository
  2. Start Redis server by calling command:
    • Before starting Redis server install the redis application
    • redis-server
  3. Now run local server on terminal by calling:
    • go run cmd/main.go
  4. 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"
     }
    
  5. 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
    }
    
  6. 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"
  7. To Run Test Cases:
    • Run local server and redis
    • Enter go test ./internal/handler/routes_test.go

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages