To run the project you need to have a php server installed (WAMP, LAMP, XAMPP, EasyPHP) and the composer installed on your machine. In addition, it is necessary to create an .env file in the /lib folder for sending emails. To do this, consult the sample file located in the same folder.
trasle@cloud:~$ composer install # for install all packages
Following the entire project proposal, use is also simple. You must first register a user on the server. This must be done through a request to /api/v1/user/register passing a JSON like this:
{
"username": "username",
"full_name": "Name",
"company": "company-name",
"email": "[email protected]"
}
You will receive the API_KEY and the directory you must use as a response. But don't worry about writing this data down, as it is sent to your email.
To upload the files, it is necessary to send the files and API_KEY with the form-data format to /api/v1/file/upload. For example:
The return will be a json with the name of the files sent and the directory where they were saved. Making it easier to save the image path in the database.