Skip to content

jimleewidjaya/Simple-Cloud-Storage

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Cloud-Storage

a service used to upload and download files that are limited by the ownership of the uploader

Requests

  1. Login
  2. Logout
  3. Upload File
  4. View Uploaded File
  5. Download File

Request 1: Login

POST/login

{
  "username": "janeDoe",
  "password": "QchpCEKOIsVhOXVj"
}

Responses:

Success

OK

{
  "status": "success",
  "message": "Login Success!"
}

Not found

Not Found

{
  "status": "error",
  "message": "Your Username and Password are Not Defined"
}

Request 2: Logout

GET/logout

Responses:

Success

OK

{
  "status": "success",
  "message": "Logged out successfully!"
}

Request 3: Upload File

POST/upload

Form-Data

  1. type = file --> key = file

Responses:

Success

OK

{
  "status": "success",
  "message": "Files uploaded successfully!"
}

Not Logged In

Not Found

{
  "status": "error",
  "message": "Log In First!"
}

Request #4: View All Uploaded file (by uploader)

GET/file

Responses:

Success

OK

{
  "status": "success",
  "files": [
    {
      "id_file": 1,
      "filename": "168656837599997.pdf"
    },
    {
      "id_file": 2,
      "filename": "-934988497.pdf"
    }
  ]
}

Not Logged In

Not Found

{
  "status": "error",
  "message": "Log In First!"
}

There are still no uploaded file

Not Found

{
  "status": "error",
  "message": "There are still no file"
}

Request #5: Download file

GET/download/<int:id_file>

Responses:

Success

OK

Not Logged In

Not Found

{
  "status": "error",
  "message": "Log In First!"
}

<int:id_file> not matching any ID || You are not the owner of file with that ID

Not Found

{
  "status": "error",
  "message": "file not found"
}

About

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages