@nestjs-mod/files
Version:
Files module with an error filter, controller and rest-sdk for work with module from other nodejs appliaction
75 lines (47 loc) • 4.52 kB
Markdown
Files module with an error filter, controller and rest-sdk for work with module from other nodejs appliaction
[![NPM version][npm-image]][npm-url] [![monthly downloads][downloads-image]][downloads-url] [![Telegram][telegram-image]][telegram-url] [![Discord][discord-image]][discord-url]
```bash
npm i --save @nestjs-mod/files
```
| Link | Category | Description |
| ---- | -------- | ----------- |
| [FilesModule](
Files module with an error filter, controller and rest-sdk for work with module from other nodejs appliaction
| Key | Description | Constraints | Default | Value |
| ------ | ----------- | ----------- | ------- | ----- |
|`getFromDownloadUrlWithoutBucketNames`|Function for get from download url without bucket names|**optional**|-|-|
|`getPresignedUrls`|Function for get presigned urls|**optional**|-|-|
|`deleteFile`|Function for delete file|**optional**|-|-|
|`buckets`|Buckets with policy|**optional**|```{"images":{"policy":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:PutObject","s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject"],"Resource":["arn:aws:s3:::images/*.jpg","arn:aws:s3:::images/*.jpeg","arn:aws:s3:::images/*.png","arn:aws:s3:::images/*.gif"]}],"Conditions":[["content-length-range",5242880]]},"ext":["jpg","jpeg","png","gif"]},"video":{"policy":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:PutObject","s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject"],"Resource":["arn:aws:s3:::video/*.mp4"]}],"Conditions":[["content-length-range",52428800]]},"ext":["mp4"]},"documents":{"policy":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Principal":{"AWS":["*"]},"Action":["s3:PutObject","s3:AbortMultipartUpload","s3:DeleteObject","s3:GetObject"],"Resource":["arn:aws:s3:::documents/*.doc","arn:aws:s3:::documents/*.docx","arn:aws:s3:::documents/*.xls","arn:aws:s3:::documents/*.md","arn:aws:s3:::documents/*.odt","arn:aws:s3:::documents/*.txt","arn:aws:s3:::documents/*.xml","arn:aws:s3:::documents/*.rtf","arn:aws:s3:::documents/*.csv"]}],"Conditions":[["content-length-range",10485760]]},"ext":["doc","docx","xls","md","odt","txt","xml","rtf","csv"]}}```|-|
| Key | Description | Sources | Constraints | Default | Value |
| ------ | ----------- | ------- | ----------- | ------- | ----- |
|`filesDefaultUserId`|Default user id|`obj['filesDefaultUserId']`, `process.env['FILES_FILES_DEFAULT_USER_ID']`|**optional**|```default```|```default```|
| Key | Description | Constraints | Default | Value |
| ------ | ----------- | ----------- | ------- | ----- |
[](
* https://github.com/nestjs-mod/nestjs-mod - A collection of utilities for unifying NestJS applications and modules
* https://github.com/nestjs-mod/nestjs-mod-contrib - Contrib repository for the NestJS-mod
* https://github.com/nestjs-mod/nestjs-mod-example - Example application built with [@nestjs-mod/schematics](https://github.com/nestjs-mod/nestjs-mod/tree/master/libs/schematics)
* https://github.com/nestjs-mod/nestjs-mod/blob/master/apps/example-basic/INFRASTRUCTURE.MD - A simple example of infrastructure documentation.
* https://github.com/nestjs-mod/nestjs-mod-contrib/blob/master/apps/example-prisma/INFRASTRUCTURE.MD - An extended example of infrastructure documentation with a docker-compose file and a data base.
* https://dev.to/endykaufman/collection-of-nestjs-mod-utilities-for-unifying-applications-and-modules-on-nestjs-5256 - Article about the project NestJS-mod
* https://habr.com/ru/articles/788916 - Коллекция утилит NestJS-mod для унификации приложений и модулей на NestJS
MIT
[]: https://badgen.net/npm/v/@nestjs-mod/files
[]: https://npmjs.org/package/@nestjs-mod/files
[]: https://img.shields.io/badge/group-telegram-blue.svg?maxAge=2592000
[]: https://t.me/nestjs_mod
[]: https://img.shields.io/badge/discord-online-brightgreen.svg
[]: https://discord.gg/meY7UXaG
[]: https://badgen.net/npm/dm/@nestjs-mod/files
[]: https://npmjs.org/package/@nestjs-mod/files