Skip to content

gjmreborn/FileCloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FileCloud

The multi-user web application for uploading and managing files stored on remote cloud

At localhost:8080 in web browser you can access web client of FileCloud.

Features

  • User authorization system
  • Web client
  • Variety of file operations (add, get, remove, compress, etc.)
  • Data validation that ensures its consistency

Developers info

  • Unit and integration tests (backend) are provided.
  • Authorization is done by session cookies with Spring Security roles. There is only one admin and many users.
  • Files are paged (pages start from 1).
  • As database, we are currently using H2 in-memory database.
  • Passwords are encrypted using BCrypt.
  • You can log in as administrator using: gjm_admin and admin credentials. This will give you access to panel where you can see other registered users.
  • Web client was created using jQuery, Bootstrap and Thymeleaf (with Spring Security module).

Technologies used

  • Java
  • Spring
  • Hibernate (JPA)
  • JUnit
  • Mockito
  • Maven
  • Thymeleaf
  • Lombok
  • HTML
  • CSS
  • JavaScript
  • jQuery
  • Bootstrap
  • Axios

Each user has these fields:

  • id
  • username - is unique and required
  • password - is required, encrypted via BCrypt
  • active - always true, currently unused
  • roles - list of user roles (ROLE_ADMIN or ROLE_USER)
  • files - list of user files

Operations on users:

  • POST /register - register user. User must be sent via HTML form.
  • GET /login - login user by name and password (sent via HTML form) - generated by Spring Security

Each file has these fields:

  • id
  • name - is unique (per user) and required
  • type - MIME file type, required
  • bytes - file content as byte array, required
  • owner - owner of file (User object)

Operations on files:

  • POST /api/files secure - add a new file. File must be sent via HTML form with type="file". In successful case 201 is returned. If file already exists, 406 will be returned.
  • GET /api/files secure - returns requested file by name (passed via query string) or 404 status code if file does not exist.
  • DELETE /api/files secure - deletes file by name (passed via params) or 404 if file does not exist.
  • GET /api/files/names - returns list of all file names
  • GET /api/files/count - returns files count
  • GET /api/files/zip - returns compressed all files in ZIP format
  • GET /api/files/names/paged - returns requested page of file names (page number is passed via query string)
  • GET /api/files/paging - returns pages count

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published