GithubHelp home page GithubHelp logo

securefilesharingsystem's Introduction

##Starting the Flask Development Server: When you run the script, Flask will start a development server, and you should see output similar to this in your terminal:

Running on http://127.0.0.1:5000

##Accessing the API Endpoints: You can access the API endpoints by making HTTP requests to the URLs specified in your code. For example:

To sign up a user, you would make a POST request to http://127.0.0.1:5000/signup. To log in, you would make a POST request to http://127.0.0.1:5000/login. To upload a file, you would make a POST request to http://127.0.0.1:5000/upload. To list files, you would make a GET request to http://127.0.0.1:5000/list_files.

##API Responses:

The API endpoints will respond with JSON data, typically including messages and data relevant to the specific operation. For example, after signing up, you'll receive a JSON response confirming successful registration. When you log in, you'll receive an access token, which you can use for authenticated requests to protected endpoints like /upload, /list_files, and /download.

##Uploading and Downloading Files:

When you upload a file using the /upload endpoint, the file will be saved in the uploads folder (as specified in your UPLOAD_FOLDER configuration). To download a file, you can use the /download/ endpoint, where is the name of the file you want to download. If the user has permission, the file will be served for download.

##Error Handling:

The code includes basic error handling for cases such as incorrect file formats, file not found, or permission denied when trying to download files.

##JWT Authentication:

JWT (JSON Web Tokens) are used for user authentication. When you log in, you receive an access token, which should be included in the headers of subsequent authenticated requests.

##MongoDB Integration:

User data (username and password) and file metadata (filename and user_id) are stored in MongoDB. Be sure to have MongoDB running and configured properly with the URI 'mongodb://localhost:27017/file_sharing'.

##Debug Mode:

The application is running in debug mode (debug=True), which means it will provide detailed error messages in case of issues. In a production environment, you should set debug=False and configure proper error handling

securefilesharingsystem's People

Stargazers

Arshad  avatar

Watchers

Arshad  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.