Skip to content

Latest commit

 

History

History
114 lines (84 loc) · 2.89 KB

README.md

File metadata and controls

114 lines (84 loc) · 2.89 KB

Convert File Service

Java Spring MongoDB Licence



PT-BR

Projeto criado com o intuito de por em prática o conteúdo obtido no estudo de java.
Esse projeto é uma API criada utilizando Java, Java Spring, MongoDB e ImageMagick.

ps: O uso da aplicação CLI ImageMagick é para a conversão de arquivos propriamente, sendo assim, a aplicação funciona como um gateway entre o usuario e a aplicação CLI.

EN-US

Project created with the purpose of putting into practice the content obtained in the study of Java.
This project is an API created using Java, Java Spring, MongoDB, and ImageMagick.

PS: The use of the ImageMagick CLI application is for file conversion purposes specifically; So, the application functions as a gateway between the user and the CLI application.

Table of Contents

Installation

  1. Clone the repository:
[email protected]:PedroH183/SwiftConvert.git
  1. Install dependencies with Maven

Usage

  1. Start the application with Maven
  2. The API will be accessible at http://localhost:8080

API Endpoints

The API provides the following endpoints:

Convert

PUT /api/convert/<ID_FILE> - Convert a file to other type.

BODY

{
    "mimeType" : "text/plain"
}

Get File Converted

GET /api/arquivo/convertedFile/<ID_FILE> - GET A FILE CONVERTED BY MIMETYPE

BODY

{
    "mimeType" : "application/pdf"
}

Get All Products

GET /api/arquivo - GET ALL FILES SENT TO API 

GET ONE FILE

GET /api/arquivo/view/<ID_FILE> - GET VIEW OF A FILE SENT TO API

Database

This project use mongodb to save reference of file paths, so create a database in your mongodb called SwiftConverterDb and enjoy !

Tabel Arquivo

public class Arquivo {

    @Id
    public String id;
    public String filename;
    public String mimeType;
    public String location;
    public List<Arquivo> conversoes;

    public Arquivo(String filename, String location, String ty, List<Arquivo> arquivos){
        this.mimeType = ty;
        this.filename = filename;
        this.location = location;
        this.conversoes = arquivos;
    }
(...)
}