📝Starting

Within our ecosystem we could not leave out the treatment of files. That is why I have created a complete solution on this subject. Niro has a complex structure for working with files, so you may want a simpler approach, for example, if you just want to have an uploads folder at the root of your project and store all the files, fine, that's possible.

To define the strategy that will be used, you must enter the name in the url, for example, if you want to save a profile picture locally in the 'uploads' folder mentioned earlier, then use URL will be: http://localhost:4000/api/files/local/single.

  • POST | GET | DELETE: http://localhost:4000/api/files/{strategy}/{single or multiple}

  • POST: http://localhost:4000/api/files/local/single

  • POST: http://localhost:4000/api/files/mongodb/single

  • POST: http://localhost:4000/api/files/aws/single

The routes must be used in RestFull, i.e. you send a file with form-data and the route of type POST. To get the raw from the file you must request the route of type GET, giving the ID of the file.

Last updated