Coder Social home page Coder Social logo

api_file-server's Introduction

API File-Server

java spring

Getting StartedAPI Endpoints

API para upload/download de arquivos e conversão de imagem e documento de texto para pdf.

🚀 Getting started

Clone o projeto:

git clone https://github.com/caiofrz/api_file-server.git
cd api_file-server

Pre requisitos

  • Java 17+

Rodando o projeto

mvn spring-boot:run

📍 API Endpoints

Here you can list the main routes of your API, and what are their expected request bodies. ​

route description
POST /api/files/upload Realiza o upload de arquivo
GET /api/files/download/{arquivo} recupera o arquivo
GET /api/files/list recupera uma lista com nome de todos os arquivos salvos no servidor
POST /api/files/convert-to-pdf realiza a conversão do arquivo em pdf. (Aquivos suportados: .png, .jpg .jpeg, .docx, .doc)

POST /api/files/upload

REQUEST Lembre de que esta é um requisição form-data

{
  "file": "back_log_23_02_2023.docx"
}

RESPONSE

{
    "status": "OK",
    "message": "Upload bem sucessido!",
    "fileDownloadUri": "http://localhost:8080/api/files/download/back_log_23_02_2023.docx"
}

POST /api/files/convert-to-pdf

REQUEST Lembre de que esta é um requisição form-data

{
  "file": "back_log_23_02_2023.docx"
}

RESPONSE

{
    "status": "OK",
    "message": "Conversão bem sucessida!",
    "fileDownloadUri": "http://localhost:8080/api/files/download/back_log_23_02_2023.pdf"
}

GET /api/files/list

RESPONSE

{
    "location": "C:/Users/caiof/OneDrive/Documentos/Projetos/api.file_server/src/main/resources/uploads",
    "size": 7,
    "files": [
        "back_log_23_02_2023.docx",
        "grafico-perfil.pdf",
        "img perfil 2.pdf",
        "img perfil.pdf",
        "launch_options_csgo.txt",
        "logoifnmg.pdf",
        "Reservar_Quarto.pdf"
    ]
}

Funcionalidades

  • Upload de arquivos
  • Download de arquivos
  • Consultas de arquivos salvos
  • Conversão de arquivos para pdf

Feedback

Se você tiver algum feedback, por favor não deixe de dá-lo.

Me contate através do github ou LinkedIn

api_file-server's People

Contributors

caiofrz avatar

Watchers

 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.