angel_file_security 1.0.1 copy "angel_file_security: ^1.0.1" to clipboard
angel_file_security: ^1.0.1 copied to clipboard

outdated

Middleware for securing file uploads.

file_security #

version 1.0.1 build status

Middleware for securing file uploads.

Supports:

  • Max file sizes
  • Max # of uploaded files
  • Restrict to certain extensions
  • Restrict to certain content types
  • Virus scan uploaded files via VirusTotal*

Your file upload API's can also be protected with throttleRequests from angel_security.

*Note: See VirusTotal's TOS. They do not allow use of their public API in commercial products. However, you can pay to use their private API.

Usage #

import 'package:angel_common/angel_common.dart';
import 'package:angel_file_security/angel_file_security.dart';

configureServer(app) async {
    app
        .chain(restrictFileUploads(
            maxFiles: 3,
            maxFileSize: 2000,
            allowedExtensions: ['.jpg', '.png', '.gif']))
        .chain(virusScanUploads('<your-api-key-here>'))
        .get(...);
}
0
likes
25
pub points
0%
popularity

Publisher

unverified uploader

Middleware for securing file uploads.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

angel_framework

More

Packages that depend on angel_file_security