Giter Site home page Giter Site logo

eduanmoldeep / document-upload-api-expressjs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a6h15hek/document-upload-api-expressjs

0.0 0.0 0.0 12.89 MB

A Generic Independent file/document uploading component that can be integrated with any application in a secure way.

Shell 0.78% JavaScript 59.68% CSS 12.45% HTML 27.08%

document-upload-api-expressjs's Introduction

DocUpload-8 API

A Generic Independent file/document uploading component that can be integrated with any application in a secure way.

API Usage

How to generate auth key to perform Read & write operation?

  • URL

    admin/register/

  • Method

    POST

  • URL Params

    Required:

    name=[alphanumeric]

    email=[alphanumeric]

    password=[alphanumeric]

    Optional:

    organization=[alphanumeric]

  • Data Params

    If making a post request, what should the body payload look like? URL Params rules apply here too.

  • Success Response

    • Code: 200
      Content: { message : "Success", Authkey : AUTH4kjkakfjjaejfjajk2324 }
  • Error Response:

    Most endpoints will have many ways they can fail. From unauthorized access, to wrongful parameters etc. All of those should be listed here. It might seem repetitive, but it helps prevent assumptions from being made where they should be.

    • Code: 401 UNAUTHORIZED
      Content: { error : "Log in" }

      AND

    • Code: 422 UNPROCESSABLE ENTRY
      Content: { error : "Email Invalid" }



How to upload files Upload and image configuration parameters?

  • URL

    admin/docment/upload

  • Method

    POST

  • URL Params

    Required:

    author=[alphanumeric]

    documentfile=[file]

    width=[integer]

    height=[integer]

    authkey=[alphanumeric]

    password=[alphanumeric]

    appname=[alphanumeric]

    Optional:

    quality=[alphanumeric]

  • Data Params

    If making a post request, what should the body payload look like? URL Params rules apply here too.

  • Success Response

    • Code: 200
      Content: { message : "success" , DocId : DOC394890280934809 }
  • Error Response:

    Most endpoints will have many ways they can fail. From unauthorized access, to wrongful parameters etc. All of those should be liste d here. It might seem repetitive, but it helps prevent assumptions from being made where they should be.

    • Code: 401 UNAUTHORIZED
      Content: { error : "email or password not match." }

      AND

    • Code: 422 UNPROCESSABLE ENTRY
      Content: { error : "Input not valid." }

      How to get the files?

  • URL

    admin/:docmentid/fileindex

  • Method

    GET

  • URL Params

    Required:

    authkey=[alphanumeric]

    password=[alphanumeric]

  • Data Params

    If making a post request, what should the body payload look like? URL Params rules apply here too.

  • Success Response

    • Code: 200
      Content: File
  • Error Response:

    Most endpoints will have many ways they can fail. From unauthorized access, to wrongful parameters etc. All of those should be liste d here. It might seem repetitive, but it helps prevent assumptions from being made where they should be.

    • Code: 401 UNAUTHORIZED
      Content: { error : "Email or Password is invalid or you are not authorized to access this file" }

      OR

    • Code: 422 UNPROCESSABLE ENTRY
      Content: { error : "inputs are not valid" }

document-upload-api-expressjs's People

Contributors

a6h15hek avatar eduanmoldeep 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.