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.
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.
- Clone the repository:
git@github.com:PedroH183/SwiftConvert.git
- Install dependencies with Maven
- Start the application with Maven
- The API will be accessible at http://localhost:8080
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
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;
}
(...)
}