<commit_before>// Type definitions for multer-s3 2.7
// Project: https://github.com/badunk/multer-s3
// Definitions by: <NAME> a.k.a. gim tcaesvk <https://github.com/tcaesvk>
//                 <NAME> <https://github.com/galtalmor>
// Definitions: https://github.com/DefinitelyType/DefinitelyTyped
// TypeScript Version: 2.2

import * as AWS from "aws-sdk";
import { StorageEngine } from "multer";

interface Options {
    s3: AWS.S3;
    bucket: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, bucket?: string) => void) => void) | string;
    key?(req: Express.Request, file: Express.Multer.File, callback: (error: any, key?: string) => void): void;
    acl?: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, acl?: string) => void) => void) | string;
    contentType?(req: Express.Request, file: Express.Multer.File, callback: (error: any, mime?: string, stream?: NodeJS.ReadableStream) => void): void;
    metadata?(req: Express.Request, file: Express.Multer.File, callback: (error: any, metadata?: any) => void): void;
    cacheControl?: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, cacheControl?: string) => void) => void) | string;
}

declare global {
    namespace Express {
        namespace MulterS3 {
            interface File extends Multer.File {
                bucket: string;
                key: string;
                acl: string;
                contentType: string;
                contentDisposition: null;
                storageClass: string;
                serverSideEncryption: null;
                metadata: any;
                location: string;
                etag: string;
            }
        }
    }<commit_msg>Add S3's serverSideEncryption option (#25262)<commit_after>// Type definitions for multer-s3 2.7
// Project: https://github.com/badunk/multer-s3
// Definitions by: <NAME> a.k.a. gim tcaesvk <https://github.com/tcaesvk>
//                 <NAME> <https://github.com/galtalmor>
//                 <NAME> <https://github.com/terski>
// Definitions: https://github.com/DefinitelyType/DefinitelyTyped
// TypeScript Version: 2.2

import * as AWS from "aws-sdk";
import { StorageEngine } from "multer";

interface Options {
    s3: AWS.S3;
    bucket: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, bucket?: string) => void) => void) | string;
    key?(req: Express.Request, file: Express.Multer.File, callback: (error: any, key?: string) => void): void;
    acl?: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, acl?: string) => void) => void) | string;
    contentType?(req: Express.Request, file: Express.Multer.File, callback: (error: any, mime?: string, stream?: NodeJS.ReadableStream) => void): void;
    metadata?(req: Express.Request, file: Express.Multer.File, callback: (error: any, metadata?: any) => void): void;
    cacheControl?: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, cacheControl?: string) => void) => void) | string;
    serverSideEncryption?: ((req: Express.Request, file: Express.Multer.File, callback: (error: any, serverSideEncryption?: string) => void) => void) | string;
}

declare global {
    namespace Express {
        namespace MulterS3 {
            interface File extends Multer.File {
                bucket: string;
                key: string;
                acl: string;
                contentType: string;
                contentDisposition: null;
                storageClass: string;
                serverSideEncryption: null;
                metadata: any;
                location: string;
                etag: string;
            }
        }
    }
{'fraction_non_alphanumeric': 0.1425094645754462, 'fraction_numerical': 0.006489994591671174, 'mean_word_length': 2.6443349753694583, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 33, 'https://': 9, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6929854', 'n_tokens_mistral': 1127, 'n_tokens_neox': 1093, 'n_words': 297}