Giter Club home page Giter Club logo

onlinefilebrowser's Introduction

Here's the rundown on this project:

INTRODUCTION:

This is an online file browser, representing the exact files on the file system specified on the server.
(This 'specification' is done using a .properties file. Check WebContent/WEB-INF/default.properties)
Uses Java + Servlets and JSP.
Supports session-based authentication
Check the downloads section for a working WAR file (includes source)

Working the server

The server has 4 servlets:

  1. auth (/OnlineFileBrowser/auth)
  2. browser (/OnlineFileBrowser/browser)
  3. data-transfer (/OnlineFileBrowser/data-transfer)
  4. upload (/OnlineFileBrowser/upload)

auth

GET

Uses a database (MySQL in this case) to load user information based on the username & password provided.
Stores these in a session


browser

GET

GETs the information for the requested path (URI). Eg: GET /.../browser/users/arunjitsingh/uploads

POST

Creates a new directory at the requested URI. Eg: POST /.../browser/users/arunjitsingh/NEW-DIR-NAME

PUT

Rename a file at the URI with the body of the request (JSON string) containing a 'name' key with its value as the new name. Eg: PUT /.../browser/users/arunjitsingh/OLD-DIR-NAME; Request body: {"name":"NEW-DIR-NAME"}

DELETE

DELETEs a file at the URI requested. Eg: DELETE /.../browser/users/arunjitsingh/DEL-THIS-DIR


data-transfer

GET

Download the file at the URI. Directories cannot be downloaded (yet). Eg: GET /.../data-transfer/users/arunjitsingh/sample.txt

POST

Upload a file to the URI requested. Uses Apache Common's ServletFileUpload


upload

Upload a file to the URI requested. Uses Apache Common's ServletFileUpload.
Automatically redirects to upload.html#success or upload.html#failure in the root of the servlet's context.

JSON and JSONP

Google them to know what they are.

Using JSON

All requests and responses, by default, use JSON.

Using JSONP

Send the JS callback in a parameter to the request. The parameters accepted for JSONP are callback (recommended) and jsonp.

onlinefilebrowser's People

Contributors

arunjitsingh avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.