@nocobase/plugin-file-manager 0.11.1-alpha.5 → 0.12.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +2 -3
- package/client.js +1 -1
- package/dist/client/index.js +979 -0
- package/{lib → dist}/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/locale/en-US.js +25 -0
- package/dist/locale/fr-FR.js +25 -0
- package/dist/locale/ja-JP.js +22 -0
- package/dist/locale/ru-RU.js +22 -0
- package/dist/locale/tr-TR.js +21 -0
- package/dist/locale/zh-CN.js +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/LICENSE +201 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3.js +197 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/S3Client.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/AbortMultipartUploadCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CompleteMultipartUploadCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CopyObjectCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateBucketCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/CreateMultipartUploadCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketCorsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketEncryptionCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketInventoryConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketLifecycleCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketOwnershipControlsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketPolicyCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketReplicationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteBucketWebsiteCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeleteObjectsCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/DeletePublicAccessBlockCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAccelerateConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAclCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketCorsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketEncryptionCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketInventoryConfigurationCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLifecycleConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLocationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketLoggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketNotificationConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketOwnershipControlsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketPolicyStatusCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketReplicationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketRequestPaymentCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketVersioningCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetBucketWebsiteCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAclCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectAttributesCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectCommand.js +62 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLegalHoldCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectLockConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectRetentionCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTaggingCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetObjectTorrentCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/GetPublicAccessBlockCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadBucketCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/HeadObjectCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketAnalyticsConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketIntelligentTieringConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketInventoryConfigurationsCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketMetricsConfigurationsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListBucketsCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListMultipartUploadsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectVersionsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListObjectsV2Command.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/ListPartsCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAccelerateConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAclCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketAnalyticsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketCorsCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketEncryptionCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketIntelligentTieringConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketInventoryConfigurationCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLifecycleConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketLoggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketMetricsConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketNotificationConfigurationCommand.js +52 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketOwnershipControlsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketPolicyCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketReplicationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketRequestPaymentCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketTaggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketVersioningCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutBucketWebsiteCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectAclCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectCommand.js +63 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLegalHoldCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectLockConfigurationCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectRetentionCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutObjectTaggingCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/PutPublicAccessBlockCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/RestoreObjectCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/SelectObjectContentCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCommand.js +61 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/UploadPartCopyCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/WriteGetObjectResponseCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/commands/index.js +96 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/EndpointParameters.js +15 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/endpointResolver.js +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/endpoint/ruleset.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/S3ServiceException.js +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/index.js +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_0.js +629 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/models/models_1.js +139 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/Interfaces.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/ListObjectsV2Paginator.js +29 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/ListPartsPaginator.js +29 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/pagination/index.js +6 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js +9691 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.browser.js +47 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.js +56 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.native.js +15 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/runtimeConfig.shared.js +28 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/index.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForBucketExists.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForBucketNotExists.js +30 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForObjectExists.js +31 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-cjs/waiters/waitForObjectNotExists.js +30 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3.js +193 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/S3Client.js +44 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/AbortMultipartUploadCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CompleteMultipartUploadCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CopyObjectCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateBucketCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/CreateMultipartUploadCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketCorsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketEncryptionCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketInventoryConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketLifecycleCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketOwnershipControlsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketPolicyCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketReplicationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteBucketWebsiteCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeleteObjectsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/DeletePublicAccessBlockCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAccelerateConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAclCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketCorsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketEncryptionCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketInventoryConfigurationCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLifecycleConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLocationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketLoggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketNotificationConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketOwnershipControlsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketPolicyStatusCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketReplicationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketRequestPaymentCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketVersioningCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetBucketWebsiteCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAclCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectAttributesCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectCommand.js +58 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLegalHoldCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectLockConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectRetentionCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTaggingCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetObjectTorrentCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/GetPublicAccessBlockCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadBucketCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/HeadObjectCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketAnalyticsConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketIntelligentTieringConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketInventoryConfigurationsCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketMetricsConfigurationsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListBucketsCommand.js +47 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListMultipartUploadsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectVersionsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListObjectsV2Command.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/ListPartsCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAccelerateConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAclCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketAnalyticsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketCorsCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketEncryptionCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketIntelligentTieringConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketInventoryConfigurationCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLifecycleConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketLoggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketMetricsConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketNotificationConfigurationCommand.js +48 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketOwnershipControlsCommand.js +50 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketPolicyCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketReplicationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketRequestPaymentCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketTaggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketVersioningCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutBucketWebsiteCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectAclCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectCommand.js +59 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLegalHoldCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectLockConfigurationCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectRetentionCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutObjectTaggingCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/PutPublicAccessBlockCommand.js +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/RestoreObjectCommand.js +55 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/SelectObjectContentCommand.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCommand.js +57 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/UploadPartCopyCommand.js +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/WriteGetObjectResponseCommand.js +49 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/commands/index.js +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/endpointResolver.js +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/endpoint/ruleset.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/index.js +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/S3ServiceException.js +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/index.js +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_0.js +589 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/models/models_1.js +122 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/Interfaces.js +1 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListObjectsV2Paginator.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/ListPartsPaginator.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/pagination/index.js +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/protocols/Aws_restXml.js +9499 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.browser.js +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.js +51 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.native.js +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/runtimeConfig.shared.js +24 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/index.js +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketExists.js +26 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForBucketNotExists.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectExists.js +26 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-es/waiters/waitForObjectNotExists.js +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3.d.ts +661 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/S3Client.d.ts +299 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/AbortMultipartUploadCommand.d.ts +131 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CompleteMultipartUploadCommand.d.ts +260 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CopyObjectCommand.d.ts +370 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateBucketCommand.d.ts +213 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/CreateMultipartUploadCommand.d.ts +427 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCommand.d.ts +97 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketCorsCommand.d.ts +103 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketEncryptionCommand.d.ts +94 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketInventoryConfigurationCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketLifecycleCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketMetricsConfigurationCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketOwnershipControlsCommand.d.ts +90 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketPolicyCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketReplicationCommand.d.ts +107 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketTaggingCommand.d.ts +99 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteBucketWebsiteCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectCommand.d.ts +130 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectTaggingCommand.d.ts +130 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeleteObjectsCommand.d.ts +229 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/DeletePublicAccessBlockCommand.d.ts +99 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAccelerateConfigurationCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAclCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketAnalyticsConfigurationCommand.d.ts +133 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketCorsCommand.d.ts +144 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketEncryptionCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +120 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketInventoryConfigurationCommand.d.ts +128 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLifecycleConfigurationCommand.d.ts +207 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLocationCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketLoggingCommand.d.ts +103 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketMetricsConfigurationCommand.d.ts +127 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketNotificationConfigurationCommand.d.ts +153 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketOwnershipControlsCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyCommand.d.ts +120 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketPolicyStatusCommand.d.ts +104 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketReplicationCommand.d.ts +194 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketRequestPaymentCommand.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketTaggingCommand.d.ts +133 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketVersioningCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetBucketWebsiteCommand.d.ts +138 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAclCommand.d.ts +188 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectAttributesCommand.d.ts +263 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectCommand.d.ts +351 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLegalHoldCommand.d.ts +89 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectLockConfigurationCommand.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectRetentionCommand.d.ts +90 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTaggingCommand.d.ts +162 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetObjectTorrentCommand.d.ts +105 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/GetPublicAccessBlockCommand.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadBucketCommand.d.ts +106 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/HeadObjectCommand.d.ts +267 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +146 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +125 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketInventoryConfigurationsCommand.d.ts +141 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketMetricsConfigurationsCommand.d.ts +135 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListBucketsCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListMultipartUploadsCommand.d.ts +258 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectVersionsCommand.d.ts +213 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsCommand.d.ts +195 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListObjectsV2Command.d.ts +197 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/ListPartsCommand.d.ts +201 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAccelerateConfigurationCommand.d.ts +114 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAclCommand.d.ts +302 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketAnalyticsConfigurationCommand.d.ts +206 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketCorsCommand.d.ts +192 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketEncryptionCommand.d.ts +119 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +151 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketInventoryConfigurationCommand.d.ts +184 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLifecycleConfigurationCommand.d.ts +248 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketLoggingCommand.d.ts +200 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketMetricsConfigurationCommand.d.ts +140 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketNotificationConfigurationCommand.d.ts +205 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketOwnershipControlsCommand.d.ts +98 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketPolicyCommand.d.ts +118 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketReplicationCommand.d.ts +227 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketRequestPaymentCommand.d.ts +108 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketTaggingCommand.d.ts +179 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketVersioningCommand.d.ts +134 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutBucketWebsiteCommand.d.ts +242 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectAclCommand.d.ts +303 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectCommand.d.ts +366 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLegalHoldCommand.d.ts +85 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectLockConfigurationCommand.d.ts +107 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectRetentionCommand.d.ts +88 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutObjectTaggingCommand.d.ts +205 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/PutPublicAccessBlockCommand.d.ts +116 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/RestoreObjectCommand.d.ts +439 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/SelectObjectContentCommand.d.ts +247 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCommand.d.ts +249 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/UploadPartCopyCommand.d.ts +320 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/WriteGetObjectResponseCommand.d.ts +152 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/commands/index.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/EndpointParameters.d.ts +32 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/endpointResolver.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/endpoint/ruleset.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/index.d.ts +12 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/S3ServiceException.d.ts +13 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_0.d.ts +10348 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/models/models_1.d.ts +1764 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/Interfaces.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListObjectsV2Paginator.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/ListPartsPaginator.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/pagination/index.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/protocols/Aws_restXml.d.ts +839 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.browser.d.ts +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.d.ts +54 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.native.d.ts +53 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/runtimeConfig.shared.d.ts +25 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3.d.ts +1646 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/S3Client.d.ts +693 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/AbortMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CompleteMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CopyObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CreateBucketCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/CreateMultipartUploadCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketAnalyticsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketCorsCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketEncryptionCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketIntelligentTieringConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketInventoryConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketLifecycleCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketMetricsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketOwnershipControlsCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketPolicyCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketReplicationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketTaggingCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteBucketWebsiteCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectTaggingCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeleteObjectsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/DeletePublicAccessBlockCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAccelerateConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketAnalyticsConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketCorsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketEncryptionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketIntelligentTieringConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketInventoryConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLifecycleConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLocationCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketLoggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketMetricsConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketNotificationConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketOwnershipControlsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketPolicyCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketPolicyStatusCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketReplicationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketRequestPaymentCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketVersioningCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetBucketWebsiteCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectAttributesCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectCommand.d.ts +36 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectLegalHoldCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectLockConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectRetentionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetObjectTorrentCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/GetPublicAccessBlockCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/HeadBucketCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/HeadObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketAnalyticsConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketIntelligentTieringConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketInventoryConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketMetricsConfigurationsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListBucketsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListMultipartUploadsCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectVersionsCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListObjectsV2Command.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/ListPartsCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAccelerateConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAclCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketAnalyticsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketCorsCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketEncryptionCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketIntelligentTieringConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketInventoryConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketLifecycleConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketLoggingCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketMetricsConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketNotificationConfigurationCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketOwnershipControlsCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketPolicyCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketReplicationCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketRequestPaymentCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketTaggingCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketVersioningCommand.d.ts +34 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutBucketWebsiteCommand.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectAclCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectCommand.d.ts +41 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectLegalHoldCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectLockConfigurationCommand.d.ts +42 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectRetentionCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutObjectTaggingCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/PutPublicAccessBlockCommand.d.ts +37 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/RestoreObjectCommand.d.ts +35 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/SelectObjectContentCommand.d.ts +39 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UploadPartCommand.d.ts +41 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/UploadPartCopyCommand.d.ts +38 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/WriteGetObjectResponseCommand.d.ts +43 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/commands/index.d.ts +93 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/EndpointParameters.d.ts +46 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/endpointResolver.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/endpoint/ruleset.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/index.d.ts +7 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/S3ServiceException.d.ts +8 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/index.d.ts +2 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_0.d.ts +2211 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/models/models_1.d.ts +460 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/Interfaces.d.ts +5 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListObjectsV2Paginator.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/ListPartsPaginator.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/pagination/index.d.ts +3 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/protocols/Aws_restXml.d.ts +1125 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.browser.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.d.ts +115 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.native.d.ts +100 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/runtimeConfig.shared.d.ts +33 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForBucketNotExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/ts3.4/waiters/waitForObjectNotExists.d.ts +11 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/index.d.ts +4 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForBucketNotExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/dist-types/waiters/waitForObjectNotExists.d.ts +14 -0
- package/dist/node_modules/@aws-sdk/client-s3/package.json +1 -0
- package/dist/node_modules/mime-match/.travis.yml +11 -0
- package/dist/node_modules/mime-match/example.js +17 -0
- package/dist/node_modules/mime-match/index.js +1 -0
- package/dist/node_modules/mime-match/package.json +1 -0
- package/dist/node_modules/mime-match/test.js +45 -0
- package/dist/node_modules/mkdirp/LICENSE +21 -0
- package/dist/node_modules/mkdirp/bin/cmd.js +33 -0
- package/dist/node_modules/mkdirp/bin/usage.txt +12 -0
- package/dist/node_modules/mkdirp/index.js +1 -0
- package/dist/node_modules/mkdirp/package.json +1 -0
- package/dist/node_modules/mkdirp/readme.markdown +100 -0
- package/dist/node_modules/multer-aliyun-oss/bridge.js +1010 -0
- package/dist/node_modules/multer-aliyun-oss/events.js +977 -0
- package/dist/node_modules/multer-aliyun-oss/index.js +166 -0
- package/dist/node_modules/multer-aliyun-oss/package.json +1 -0
- package/dist/node_modules/multer-aliyun-oss/setup-node-sandbox.js +461 -0
- package/dist/node_modules/multer-aliyun-oss/setup-sandbox.js +545 -0
- package/dist/node_modules/multer-cos/LICENSE +24 -0
- package/dist/node_modules/multer-cos/demo/index.js +39 -0
- package/dist/node_modules/multer-cos/demo/myMulter.js +88 -0
- package/dist/node_modules/multer-cos/index.js +220 -0
- package/dist/node_modules/multer-cos/package.json +1 -0
- package/dist/node_modules/multer-s3/.gitattributes +1 -0
- package/dist/node_modules/multer-s3/.travis.yml +6 -0
- package/dist/node_modules/multer-s3/LICENSE +22 -0
- package/dist/node_modules/multer-s3/index.js +35 -0
- package/dist/node_modules/multer-s3/package.json +1 -0
- package/dist/node_modules/multer-s3/test/basic.js +293 -0
- package/dist/node_modules/multer-s3/test/files/a.txt +1 -0
- package/dist/node_modules/multer-s3/test/files/test.svg +3 -0
- package/dist/node_modules/multer-s3/test/files/test2.svg +9 -0
- package/dist/node_modules/multer-s3/test/util/mock-s3.js +17 -0
- package/dist/server/actions/attachments.js +173 -0
- package/dist/server/actions/index.js +16 -0
- package/dist/server/collections/attachments.js +67 -0
- package/dist/server/collections/storages.js +67 -0
- package/dist/server/constants.js +17 -0
- package/dist/server/index.js +23 -0
- package/dist/server/rules/index.js +14 -0
- package/dist/server/rules/mimetype.js +13 -0
- package/dist/server/server.js +75 -0
- package/{src/server/storages/ali-oss.ts → dist/server/storages/ali-oss.js} +17 -14
- package/dist/server/storages/index.js +30 -0
- package/dist/server/storages/local.js +148 -0
- package/{src/server/storages/s3.ts → dist/server/storages/s3.js} +26 -26
- package/dist/server/storages/tx-cos.js +44 -0
- package/dist/server/utils.js +26 -0
- package/package.json +21 -32
- package/server.d.ts +2 -3
- package/server.js +1 -1
- package/lib/client/FileManagerProvider.js +0 -94
- package/lib/client/FileStorage.js +0 -41
- package/lib/client/StorageOptions.js +0 -181
- package/lib/client/hooks/index.js +0 -16
- package/lib/client/hooks/useUploadFiles.js +0 -78
- package/lib/client/index.js +0 -27
- package/lib/client/initializers/UploadActionInitializer.js +0 -67
- package/lib/client/initializers/index.js +0 -16
- package/lib/client/interfaces/attachment.js +0 -139
- package/lib/client/locale/index.js +0 -19
- package/lib/client/schemas/storage.js +0 -408
- package/lib/client/templates/file.js +0 -164
- package/lib/client/templates/index.js +0 -16
- package/lib/index.js +0 -13
- package/lib/locale/en-US.js +0 -28
- package/lib/locale/fr-FR.js +0 -28
- package/lib/locale/ja-JP.js +0 -25
- package/lib/locale/ru-RU.js +0 -25
- package/lib/locale/tr-TR.js +0 -24
- package/lib/locale/zh-CN.js +0 -38
- package/lib/server/actions/attachments.js +0 -211
- package/lib/server/actions/index.js +0 -22
- package/lib/server/collections/attachments.js +0 -61
- package/lib/server/collections/storages.js +0 -61
- package/lib/server/constants.js +0 -20
- package/lib/server/index.js +0 -26
- package/lib/server/rules/index.js +0 -13
- package/lib/server/rules/mimetype.js +0 -17
- package/lib/server/server.js +0 -105
- package/lib/server/storages/ali-oss.js +0 -44
- package/lib/server/storages/index.js +0 -30
- package/lib/server/storages/local.js +0 -233
- package/lib/server/storages/s3.js +0 -86
- package/lib/server/storages/tx-cos.js +0 -58
- package/lib/server/utils.js +0 -36
- package/src/client/FileManagerProvider.tsx +0 -84
- package/src/client/FileStorage.tsx +0 -15
- package/src/client/StorageOptions.tsx +0 -146
- package/src/client/hooks/index.ts +0 -1
- package/src/client/hooks/useUploadFiles.ts +0 -55
- package/src/client/index.tsx +0 -10
- package/src/client/initializers/UploadActionInitializer.tsx +0 -42
- package/src/client/initializers/index.ts +0 -1
- package/src/client/interfaces/attachment.ts +0 -116
- package/src/client/locale/index.ts +0 -7
- package/src/client/schemas/storage.ts +0 -391
- package/src/client/templates/file.ts +0 -154
- package/src/client/templates/index.ts +0 -1
- package/src/index.ts +0 -1
- package/src/locale/en-US.ts +0 -21
- package/src/locale/fr-FR.ts +0 -21
- package/src/locale/ja-JP.ts +0 -18
- package/src/locale/ru-RU.ts +0 -18
- package/src/locale/tr-TR.ts +0 -17
- package/src/locale/zh-CN.ts +0 -31
- package/src/server/__tests__/action.test.ts +0 -332
- package/src/server/__tests__/attachment.test.ts +0 -50
- package/src/server/__tests__/files/image.jpg +0 -0
- package/src/server/__tests__/files/image.png +0 -0
- package/src/server/__tests__/files/text.txt +0 -1
- package/src/server/__tests__/index.ts +0 -34
- package/src/server/__tests__/storages/ali-oss.test.ts +0 -127
- package/src/server/__tests__/storages/s3.test.ts +0 -126
- package/src/server/__tests__/storages/tx-cos.test.ts +0 -69
- package/src/server/__tests__/tables/users.ts +0 -26
- package/src/server/actions/attachments.ts +0 -175
- package/src/server/actions/index.ts +0 -9
- package/src/server/collections/attachments.ts +0 -65
- package/src/server/collections/storages.ts +0 -65
- package/src/server/constants.ts +0 -8
- package/src/server/index.ts +0 -2
- package/src/server/rules/index.ts +0 -3
- package/src/server/rules/mimetype.ts +0 -5
- package/src/server/server.ts +0 -79
- package/src/server/storages/index.ts +0 -46
- package/src/server/storages/local.ts +0 -167
- package/src/server/storages/tx-cos.ts +0 -42
- package/src/server/utils.ts +0 -17
- /package/{lib → dist}/client/FileManagerProvider.d.ts +0 -0
- /package/{lib → dist}/client/FileStorage.d.ts +0 -0
- /package/{lib → dist}/client/StorageOptions.d.ts +0 -0
- /package/{lib → dist}/client/hooks/index.d.ts +0 -0
- /package/{lib → dist}/client/hooks/useUploadFiles.d.ts +0 -0
- /package/{lib → dist}/client/index.d.ts +0 -0
- /package/{lib → dist}/client/initializers/UploadActionInitializer.d.ts +0 -0
- /package/{lib → dist}/client/initializers/index.d.ts +0 -0
- /package/{lib → dist}/client/interfaces/attachment.d.ts +0 -0
- /package/{lib → dist}/client/locale/index.d.ts +0 -0
- /package/{lib → dist}/client/schemas/storage.d.ts +0 -0
- /package/{lib → dist}/client/templates/file.d.ts +0 -0
- /package/{lib → dist}/client/templates/index.d.ts +0 -0
- /package/{lib → dist}/locale/en-US.d.ts +0 -0
- /package/{lib → dist}/locale/fr-FR.d.ts +0 -0
- /package/{lib → dist}/locale/ja-JP.d.ts +0 -0
- /package/{lib → dist}/locale/ru-RU.d.ts +0 -0
- /package/{lib → dist}/locale/tr-TR.d.ts +0 -0
- /package/{lib → dist}/locale/zh-CN.d.ts +0 -0
- /package/{lib → dist}/server/actions/attachments.d.ts +0 -0
- /package/{lib → dist}/server/actions/index.d.ts +0 -0
- /package/{lib → dist}/server/collections/attachments.d.ts +0 -0
- /package/{lib → dist}/server/collections/storages.d.ts +0 -0
- /package/{lib → dist}/server/constants.d.ts +0 -0
- /package/{lib → dist}/server/index.d.ts +0 -0
- /package/{lib → dist}/server/rules/index.d.ts +0 -0
- /package/{lib → dist}/server/rules/mimetype.d.ts +0 -0
- /package/{lib → dist}/server/server.d.ts +0 -0
- /package/{lib → dist}/server/storages/ali-oss.d.ts +0 -0
- /package/{lib → dist}/server/storages/index.d.ts +0 -0
- /package/{lib → dist}/server/storages/local.d.ts +0 -0
- /package/{lib → dist}/server/storages/s3.d.ts +0 -0
- /package/{lib → dist}/server/storages/tx-cos.d.ts +0 -0
- /package/{lib → dist}/server/utils.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"multer-s3","version":"3.0.1","description":"Streaming multer storage engine for AWS S3","main":"index.js","scripts":{"test":"standard && mocha test/basic.js"},"engines":{"node":">= 12.0.0"},"repository":{"type":"git","url":"git+https://github.com/badunk/multer-s3.git"},"keywords":["multer","s3","amazon","aws"],"author":"badunk","license":"MIT","bugs":{"url":"https://github.com/badunk/multer-s3/issues"},"homepage":"https://github.com/badunk/multer-s3#readme","dependencies":{"@aws-sdk/lib-storage":"^3.46.0","file-type":"^3.3.0","html-comment-regex":"^1.1.2","run-parallel":"^1.1.6"},"peerDependencies":{"@aws-sdk/client-s3":"^3.0.0"},"devDependencies":{"express":"^4.13.1","form-data":"^1.0.0-rc3","mocha":"^2.2.5","multer":"^1.1.0","on-finished":"^2.3.0","standard":"^5.4.1","xtend":"^4.0.1"},"_lastModified":"2023-08-01T18:37:55.503Z"}
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/* eslint-env mocha */
|
|
2
|
+
|
|
3
|
+
var multerS3 = require('../')
|
|
4
|
+
|
|
5
|
+
var fs = require('fs')
|
|
6
|
+
var path = require('path')
|
|
7
|
+
var extend = require('xtend')
|
|
8
|
+
var assert = require('assert')
|
|
9
|
+
var multer = require('multer')
|
|
10
|
+
var stream = require('stream')
|
|
11
|
+
var FormData = require('form-data')
|
|
12
|
+
var onFinished = require('on-finished')
|
|
13
|
+
var mockS3 = require('./util/mock-s3')
|
|
14
|
+
|
|
15
|
+
var VALID_OPTIONS = {
|
|
16
|
+
bucket: 'string'
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
var INVALID_OPTIONS = [
|
|
20
|
+
['numeric key', { key: 1337 }],
|
|
21
|
+
['string key', { key: 'string' }],
|
|
22
|
+
['numeric bucket', { bucket: 1337 }],
|
|
23
|
+
['numeric contentType', { contentType: 1337 }]
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
function submitForm (multer, form, cb) {
|
|
27
|
+
form.getLength(function (err, length) {
|
|
28
|
+
if (err) return cb(err)
|
|
29
|
+
|
|
30
|
+
var req = new stream.PassThrough()
|
|
31
|
+
|
|
32
|
+
req.complete = false
|
|
33
|
+
form.once('end', function () {
|
|
34
|
+
req.complete = true
|
|
35
|
+
})
|
|
36
|
+
|
|
37
|
+
form.pipe(req)
|
|
38
|
+
req.headers = {
|
|
39
|
+
'content-type': 'multipart/form-data; boundary=' + form.getBoundary(),
|
|
40
|
+
'content-length': length
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
multer(req, null, function (err) {
|
|
44
|
+
onFinished(req, function () { cb(err, req) })
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
describe('Multer S3', function () {
|
|
50
|
+
it('is exposed as a function', function () {
|
|
51
|
+
assert.equal(typeof multerS3, 'function')
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
INVALID_OPTIONS.forEach(function (testCase) {
|
|
55
|
+
it('throws when given ' + testCase[0], function () {
|
|
56
|
+
function testBody () {
|
|
57
|
+
multerS3(extend(VALID_OPTIONS, testCase[1]))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
assert.throws(testBody, TypeError)
|
|
61
|
+
})
|
|
62
|
+
})
|
|
63
|
+
|
|
64
|
+
it('upload files', function (done) {
|
|
65
|
+
var s3 = mockS3()
|
|
66
|
+
var form = new FormData()
|
|
67
|
+
var storage = multerS3({ s3: s3, bucket: 'test' })
|
|
68
|
+
var upload = multer({ storage: storage })
|
|
69
|
+
var parser = upload.single('image')
|
|
70
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'ffffff.png'))
|
|
71
|
+
|
|
72
|
+
form.append('name', 'Multer')
|
|
73
|
+
form.append('image', image)
|
|
74
|
+
|
|
75
|
+
submitForm(parser, form, function (err, req) {
|
|
76
|
+
assert.ifError(err)
|
|
77
|
+
|
|
78
|
+
assert.equal(req.body.name, 'Multer')
|
|
79
|
+
|
|
80
|
+
assert.equal(req.file.fieldname, 'image')
|
|
81
|
+
assert.equal(req.file.originalname, 'ffffff.png')
|
|
82
|
+
assert.equal(req.file.size, 68)
|
|
83
|
+
assert.equal(req.file.bucket, 'test')
|
|
84
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
85
|
+
assert.equal(req.file.location, 'mock-location')
|
|
86
|
+
|
|
87
|
+
done()
|
|
88
|
+
})
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
it('uploads file with AES256 server-side encryption', function (done) {
|
|
92
|
+
var s3 = mockS3()
|
|
93
|
+
var form = new FormData()
|
|
94
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'AES256' })
|
|
95
|
+
var upload = multer({ storage: storage })
|
|
96
|
+
var parser = upload.single('image')
|
|
97
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'ffffff.png'))
|
|
98
|
+
|
|
99
|
+
form.append('name', 'Multer')
|
|
100
|
+
form.append('image', image)
|
|
101
|
+
|
|
102
|
+
submitForm(parser, form, function (err, req) {
|
|
103
|
+
assert.ifError(err)
|
|
104
|
+
|
|
105
|
+
assert.equal(req.body.name, 'Multer')
|
|
106
|
+
|
|
107
|
+
assert.equal(req.file.fieldname, 'image')
|
|
108
|
+
assert.equal(req.file.originalname, 'ffffff.png')
|
|
109
|
+
assert.equal(req.file.size, 68)
|
|
110
|
+
assert.equal(req.file.bucket, 'test')
|
|
111
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
112
|
+
assert.equal(req.file.location, 'mock-location')
|
|
113
|
+
assert.equal(req.file.serverSideEncryption, 'AES256')
|
|
114
|
+
|
|
115
|
+
done()
|
|
116
|
+
})
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
it('uploads file with AWS KMS-managed server-side encryption', function (done) {
|
|
120
|
+
var s3 = mockS3()
|
|
121
|
+
var form = new FormData()
|
|
122
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms' })
|
|
123
|
+
var upload = multer({ storage: storage })
|
|
124
|
+
var parser = upload.single('image')
|
|
125
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'ffffff.png'))
|
|
126
|
+
|
|
127
|
+
form.append('name', 'Multer')
|
|
128
|
+
form.append('image', image)
|
|
129
|
+
|
|
130
|
+
submitForm(parser, form, function (err, req) {
|
|
131
|
+
assert.ifError(err)
|
|
132
|
+
|
|
133
|
+
assert.equal(req.body.name, 'Multer')
|
|
134
|
+
|
|
135
|
+
assert.equal(req.file.fieldname, 'image')
|
|
136
|
+
assert.equal(req.file.originalname, 'ffffff.png')
|
|
137
|
+
assert.equal(req.file.size, 68)
|
|
138
|
+
assert.equal(req.file.bucket, 'test')
|
|
139
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
140
|
+
assert.equal(req.file.location, 'mock-location')
|
|
141
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
142
|
+
|
|
143
|
+
done()
|
|
144
|
+
})
|
|
145
|
+
})
|
|
146
|
+
|
|
147
|
+
it('uploads PNG file with correct content-type', function (done) {
|
|
148
|
+
var s3 = mockS3()
|
|
149
|
+
var form = new FormData()
|
|
150
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms', contentType: multerS3.AUTO_CONTENT_TYPE })
|
|
151
|
+
var upload = multer({ storage: storage })
|
|
152
|
+
var parser = upload.single('image')
|
|
153
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'ffffff.png'))
|
|
154
|
+
|
|
155
|
+
form.append('name', 'Multer')
|
|
156
|
+
form.append('image', image)
|
|
157
|
+
|
|
158
|
+
submitForm(parser, form, function (err, req) {
|
|
159
|
+
assert.ifError(err)
|
|
160
|
+
|
|
161
|
+
assert.equal(req.body.name, 'Multer')
|
|
162
|
+
|
|
163
|
+
assert.equal(req.file.fieldname, 'image')
|
|
164
|
+
assert.equal(req.file.contentType, 'image/png')
|
|
165
|
+
assert.equal(req.file.originalname, 'ffffff.png')
|
|
166
|
+
assert.equal(req.file.size, 68)
|
|
167
|
+
assert.equal(req.file.bucket, 'test')
|
|
168
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
169
|
+
assert.equal(req.file.location, 'mock-location')
|
|
170
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
171
|
+
|
|
172
|
+
done()
|
|
173
|
+
})
|
|
174
|
+
})
|
|
175
|
+
|
|
176
|
+
it('uploads pure SVG file with correct content-type', function (done) {
|
|
177
|
+
var s3 = mockS3()
|
|
178
|
+
var form = new FormData()
|
|
179
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms', contentType: multerS3.AUTO_CONTENT_TYPE })
|
|
180
|
+
var upload = multer({ storage: storage })
|
|
181
|
+
var parser = upload.single('image')
|
|
182
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'test.svg'))
|
|
183
|
+
|
|
184
|
+
form.append('name', 'Multer')
|
|
185
|
+
form.append('image', image)
|
|
186
|
+
|
|
187
|
+
submitForm(parser, form, function (err, req) {
|
|
188
|
+
assert.ifError(err)
|
|
189
|
+
|
|
190
|
+
assert.equal(req.body.name, 'Multer')
|
|
191
|
+
|
|
192
|
+
assert.equal(req.file.fieldname, 'image')
|
|
193
|
+
assert.equal(req.file.contentType, 'image/svg+xml')
|
|
194
|
+
assert.equal(req.file.originalname, 'test.svg')
|
|
195
|
+
assert.equal(req.file.size, 100)
|
|
196
|
+
assert.equal(req.file.bucket, 'test')
|
|
197
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
198
|
+
assert.equal(req.file.location, 'mock-location')
|
|
199
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
200
|
+
|
|
201
|
+
done()
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
|
|
205
|
+
it('uploads common SVG file with correct content-type', function (done) {
|
|
206
|
+
var s3 = mockS3()
|
|
207
|
+
var form = new FormData()
|
|
208
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms', contentType: multerS3.AUTO_CONTENT_TYPE })
|
|
209
|
+
var upload = multer({ storage: storage })
|
|
210
|
+
var parser = upload.single('image')
|
|
211
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'test2.svg'))
|
|
212
|
+
|
|
213
|
+
form.append('name', 'Multer')
|
|
214
|
+
form.append('image', image)
|
|
215
|
+
|
|
216
|
+
submitForm(parser, form, function (err, req) {
|
|
217
|
+
assert.ifError(err)
|
|
218
|
+
|
|
219
|
+
assert.equal(req.body.name, 'Multer')
|
|
220
|
+
|
|
221
|
+
assert.equal(req.file.fieldname, 'image')
|
|
222
|
+
assert.equal(req.file.contentType, 'image/svg+xml')
|
|
223
|
+
assert.equal(req.file.originalname, 'test2.svg')
|
|
224
|
+
assert.equal(req.file.size, 285)
|
|
225
|
+
assert.equal(req.file.bucket, 'test')
|
|
226
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
227
|
+
assert.equal(req.file.location, 'mock-location')
|
|
228
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
229
|
+
|
|
230
|
+
done()
|
|
231
|
+
})
|
|
232
|
+
})
|
|
233
|
+
|
|
234
|
+
it('uploads SVG file without quadratic regex', function (done) {
|
|
235
|
+
this.timeout('10s')
|
|
236
|
+
|
|
237
|
+
var s3 = mockS3()
|
|
238
|
+
var form = new FormData()
|
|
239
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms', contentType: multerS3.AUTO_CONTENT_TYPE })
|
|
240
|
+
var upload = multer({ storage: storage })
|
|
241
|
+
var parser = upload.single('image')
|
|
242
|
+
fs.writeFileSync(path.join(__dirname, 'files', 'test_generated.svg'), '<!doctype svg ' + ' '.repeat(34560))
|
|
243
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'test_generated.svg'))
|
|
244
|
+
|
|
245
|
+
form.append('name', 'Multer')
|
|
246
|
+
form.append('image', image)
|
|
247
|
+
|
|
248
|
+
submitForm(parser, form, function (err, req) {
|
|
249
|
+
assert.ifError(err)
|
|
250
|
+
|
|
251
|
+
assert.equal(req.body.name, 'Multer')
|
|
252
|
+
|
|
253
|
+
assert.equal(req.file.fieldname, 'image')
|
|
254
|
+
assert.equal(req.file.contentType, 'application/octet-stream')
|
|
255
|
+
assert.equal(req.file.originalname, 'test_generated.svg')
|
|
256
|
+
assert.equal(req.file.size, 34574)
|
|
257
|
+
assert.equal(req.file.bucket, 'test')
|
|
258
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
259
|
+
assert.equal(req.file.location, 'mock-location')
|
|
260
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
261
|
+
|
|
262
|
+
done()
|
|
263
|
+
})
|
|
264
|
+
})
|
|
265
|
+
|
|
266
|
+
it('uploads common file as gzip content encoded', function (done) {
|
|
267
|
+
var s3 = mockS3()
|
|
268
|
+
var form = new FormData()
|
|
269
|
+
var storage = multerS3({ s3: s3, bucket: 'test', serverSideEncryption: 'aws:kms', contentType: multerS3.AUTO_CONTENT_TYPE, contentEncoding: 'gzip' })
|
|
270
|
+
var upload = multer({ storage: storage })
|
|
271
|
+
var parser = upload.single('file')
|
|
272
|
+
var image = fs.createReadStream(path.join(__dirname, 'files', 'a.txt'))
|
|
273
|
+
|
|
274
|
+
form.append('name', 'Multer')
|
|
275
|
+
form.append('file', image)
|
|
276
|
+
|
|
277
|
+
submitForm(parser, form, function (err, req) {
|
|
278
|
+
assert.ifError(err)
|
|
279
|
+
|
|
280
|
+
assert.equal(req.body.name, 'Multer')
|
|
281
|
+
assert.equal(req.file.fieldname, 'file')
|
|
282
|
+
assert.equal(req.file.contentType, 'application/octet-stream')
|
|
283
|
+
assert.equal(req.file.originalname, 'a.txt')
|
|
284
|
+
assert.equal(req.file.size, 7)
|
|
285
|
+
assert.equal(req.file.bucket, 'test')
|
|
286
|
+
assert.equal(req.file.etag, 'mock-etag')
|
|
287
|
+
assert.equal(req.file.location, 'mock-location')
|
|
288
|
+
assert.equal(req.file.serverSideEncryption, 'aws:kms')
|
|
289
|
+
assert.equal(req.file.contentEncoding, 'gzip')
|
|
290
|
+
done()
|
|
291
|
+
})
|
|
292
|
+
})
|
|
293
|
+
})
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
content
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<?xml version="1.0"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
|
|
3
|
+
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
|
|
5
|
+
<svg xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
width="226" height="226">
|
|
7
|
+
<circle cx="110" cy="107" r="80" stroke="black"
|
|
8
|
+
stroke-width="5" fill="red" />
|
|
9
|
+
</svg>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
var events = require('events')
|
|
2
|
+
|
|
3
|
+
function createMockS3 () {
|
|
4
|
+
function send (opts, cb) {
|
|
5
|
+
var ee = new events.EventEmitter()
|
|
6
|
+
var buffer = opts['input']['Body']
|
|
7
|
+
ee.emit('httpUploadProgress', { total: buffer.length })
|
|
8
|
+
return Promise.resolve({
|
|
9
|
+
Location: 'mock-location',
|
|
10
|
+
ETag: 'mock-etag'
|
|
11
|
+
})
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
return { send: send }
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
module.exports = createMockS3
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var utils = require('@nocobase/utils');
|
|
4
|
+
var path = require('path');
|
|
5
|
+
var constants = require('../constants');
|
|
6
|
+
var Rules = require('../rules');
|
|
7
|
+
var storages = require('../storages');
|
|
8
|
+
|
|
9
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
|
|
11
|
+
function _interopNamespace(e) {
|
|
12
|
+
if (e && e.__esModule) return e;
|
|
13
|
+
var n = Object.create(null);
|
|
14
|
+
if (e) {
|
|
15
|
+
Object.keys(e).forEach(function (k) {
|
|
16
|
+
if (k !== 'default') {
|
|
17
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
18
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () { return e[k]; }
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
n.default = e;
|
|
26
|
+
return Object.freeze(n);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
30
|
+
var Rules__namespace = /*#__PURE__*/_interopNamespace(Rules);
|
|
31
|
+
|
|
32
|
+
function getFileFilter(storage) {
|
|
33
|
+
return (req, file, cb) => {
|
|
34
|
+
const { size, ...rules } = storage.rules;
|
|
35
|
+
const ruleKeys = Object.keys(rules);
|
|
36
|
+
const result = !ruleKeys.length || !ruleKeys.some((key) => typeof Rules__namespace[key] !== "function" || !Rules__namespace[key](file, rules[key]));
|
|
37
|
+
cb(null, result);
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
function getFileData(ctx) {
|
|
41
|
+
const { [constants.FILE_FIELD_NAME]: file, storage } = ctx;
|
|
42
|
+
if (!file) {
|
|
43
|
+
return ctx.throw(400, "file validation failed");
|
|
44
|
+
}
|
|
45
|
+
const storageConfig = storages.getStorageConfig(storage.type);
|
|
46
|
+
const { [storageConfig.filenameKey || "filename"]: name } = file;
|
|
47
|
+
const filename = path__default.default.basename(name);
|
|
48
|
+
const extname = path__default.default.extname(filename);
|
|
49
|
+
const urlPath = storage.path ? storage.path.replace(/^([^/])/, "/$1") : "";
|
|
50
|
+
return {
|
|
51
|
+
title: file.originalname.replace(extname, ""),
|
|
52
|
+
filename,
|
|
53
|
+
extname,
|
|
54
|
+
// TODO(feature): 暂时两者相同,后面 storage.path 模版化以后,这里只是 file 实际的 path
|
|
55
|
+
path: storage.path,
|
|
56
|
+
size: file.size,
|
|
57
|
+
// 直接缓存起来
|
|
58
|
+
url: `${storage.baseUrl}${urlPath}/${filename}`,
|
|
59
|
+
mimetype: file.mimetype,
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
meta: ctx.request.body,
|
|
62
|
+
storageId: storage.id,
|
|
63
|
+
...storageConfig.getFileData ? storageConfig.getFileData(file) : {}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
async function multipart(ctx, next) {
|
|
67
|
+
const { storage } = ctx;
|
|
68
|
+
if (!storage) {
|
|
69
|
+
ctx.logger.error("[file-manager] no linked or default storage provided");
|
|
70
|
+
return ctx.throw(500);
|
|
71
|
+
}
|
|
72
|
+
const storageConfig = storages.getStorageConfig(storage.type);
|
|
73
|
+
if (!storageConfig) {
|
|
74
|
+
ctx.logger.error(`[file-manager] storage type "${storage.type}" is not defined`);
|
|
75
|
+
return ctx.throw(500);
|
|
76
|
+
}
|
|
77
|
+
const multerOptions = {
|
|
78
|
+
fileFilter: getFileFilter(storage),
|
|
79
|
+
limits: {
|
|
80
|
+
fileSize: storage.rules.size ?? constants.DEFAULT_MAX_FILE_SIZE,
|
|
81
|
+
// 每次只允许提交一个文件
|
|
82
|
+
files: constants.LIMIT_FILES
|
|
83
|
+
},
|
|
84
|
+
storage: storageConfig.make(storage)
|
|
85
|
+
};
|
|
86
|
+
const upload = utils.koaMulter(multerOptions).single(constants.FILE_FIELD_NAME);
|
|
87
|
+
try {
|
|
88
|
+
await upload(ctx, () => {
|
|
89
|
+
});
|
|
90
|
+
} catch (err) {
|
|
91
|
+
if (err.name === "MulterError") {
|
|
92
|
+
return ctx.throw(400, err);
|
|
93
|
+
}
|
|
94
|
+
return ctx.throw(500);
|
|
95
|
+
}
|
|
96
|
+
const values = getFileData(ctx);
|
|
97
|
+
ctx.action.mergeParams({
|
|
98
|
+
values
|
|
99
|
+
});
|
|
100
|
+
await next();
|
|
101
|
+
}
|
|
102
|
+
async function createMiddleware(ctx, next) {
|
|
103
|
+
var _a, _b, _c;
|
|
104
|
+
const { resourceName, actionName } = ctx.action;
|
|
105
|
+
const { attachmentField } = ctx.action.params;
|
|
106
|
+
const collection = ctx.db.getCollection(resourceName);
|
|
107
|
+
if (((_a = collection == null ? void 0 : collection.options) == null ? void 0 : _a.template) !== "file" || !["upload", "create"].includes(actionName)) {
|
|
108
|
+
return next();
|
|
109
|
+
}
|
|
110
|
+
const storageName = ((_c = (_b = ctx.db.getFieldByPath(attachmentField)) == null ? void 0 : _b.options) == null ? void 0 : _c.storage) || collection.options.storage;
|
|
111
|
+
const StorageRepo = ctx.db.getRepository("storages");
|
|
112
|
+
const storage = await StorageRepo.findOne({ filter: storageName ? { name: storageName } : { default: true } });
|
|
113
|
+
ctx.storage = storage;
|
|
114
|
+
await multipart(ctx, next);
|
|
115
|
+
}
|
|
116
|
+
async function destroyMiddleware(ctx, next) {
|
|
117
|
+
var _a;
|
|
118
|
+
const { resourceName, actionName } = ctx.action;
|
|
119
|
+
const collection = ctx.db.getCollection(resourceName);
|
|
120
|
+
if (((_a = collection == null ? void 0 : collection.options) == null ? void 0 : _a.template) !== "file" || actionName !== "destroy") {
|
|
121
|
+
return next();
|
|
122
|
+
}
|
|
123
|
+
const repository = ctx.db.getRepository(resourceName);
|
|
124
|
+
const { filterByTk, filter } = ctx.action.params;
|
|
125
|
+
const records = await repository.find({
|
|
126
|
+
filterByTk,
|
|
127
|
+
filter,
|
|
128
|
+
context: ctx
|
|
129
|
+
});
|
|
130
|
+
const storageIds = new Set(records.map((record) => record.storageId));
|
|
131
|
+
const storageGroupedRecords = records.reduce((result, record) => {
|
|
132
|
+
const storageId = record.storageId;
|
|
133
|
+
if (!result[storageId]) {
|
|
134
|
+
result[storageId] = [];
|
|
135
|
+
}
|
|
136
|
+
result[storageId].push(record);
|
|
137
|
+
return result;
|
|
138
|
+
}, {});
|
|
139
|
+
const storages$1 = await ctx.db.getRepository("storages").find({
|
|
140
|
+
filter: {
|
|
141
|
+
id: [...storageIds],
|
|
142
|
+
paranoid: {
|
|
143
|
+
$ne: true
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
let count = 0;
|
|
148
|
+
const undeleted = [];
|
|
149
|
+
await storages$1.reduce(
|
|
150
|
+
(promise, storage) => promise.then(async () => {
|
|
151
|
+
const storageConfig = storages.getStorageConfig(storage.type);
|
|
152
|
+
const result = await storageConfig.delete(storage, storageGroupedRecords[storage.id]);
|
|
153
|
+
count += result[0];
|
|
154
|
+
undeleted.push(...result[1]);
|
|
155
|
+
}),
|
|
156
|
+
Promise.resolve()
|
|
157
|
+
);
|
|
158
|
+
if (undeleted.length) {
|
|
159
|
+
const ids = undeleted.map((record) => record.id);
|
|
160
|
+
ctx.action.mergeParams({
|
|
161
|
+
filter: {
|
|
162
|
+
id: {
|
|
163
|
+
$notIn: ids
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
ctx.logger.error("[file-manager] some of attachment files are not successfully deleted: ", { ids });
|
|
168
|
+
}
|
|
169
|
+
await next();
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
exports.createMiddleware = createMiddleware;
|
|
173
|
+
exports.destroyMiddleware = destroyMiddleware;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var actions = require('@nocobase/actions');
|
|
4
|
+
var attachments = require('./attachments');
|
|
5
|
+
|
|
6
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
|
|
8
|
+
var actions__default = /*#__PURE__*/_interopDefault(actions);
|
|
9
|
+
|
|
10
|
+
function actions_default({ app }) {
|
|
11
|
+
app.resourcer.use(attachments.createMiddleware);
|
|
12
|
+
app.resourcer.registerActionHandler("upload", actions__default.default.create);
|
|
13
|
+
app.resourcer.use(attachments.destroyMiddleware);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = actions_default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var attachments_default = {
|
|
4
|
+
namespace: "file-manager.attachmentRecords",
|
|
5
|
+
duplicator: "optional",
|
|
6
|
+
name: "attachments",
|
|
7
|
+
title: "\u6587\u4EF6\u7BA1\u7406\u5668",
|
|
8
|
+
createdBy: true,
|
|
9
|
+
updatedBy: true,
|
|
10
|
+
template: "file",
|
|
11
|
+
fields: [
|
|
12
|
+
{
|
|
13
|
+
comment: "\u7528\u6237\u6587\u4EF6\u540D\uFF08\u4E0D\u542B\u6269\u5C55\u540D\uFF09",
|
|
14
|
+
type: "string",
|
|
15
|
+
name: "title"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
comment: "\u7CFB\u7EDF\u6587\u4EF6\u540D\uFF08\u542B\u6269\u5C55\u540D\uFF09",
|
|
19
|
+
type: "string",
|
|
20
|
+
name: "filename"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
comment: "\u6269\u5C55\u540D\uFF08\u542B\u201C.\u201D\uFF09",
|
|
24
|
+
type: "string",
|
|
25
|
+
name: "extname"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
comment: "\u6587\u4EF6\u4F53\u79EF\uFF08\u5B57\u8282\uFF09",
|
|
29
|
+
type: "integer",
|
|
30
|
+
name: "size"
|
|
31
|
+
},
|
|
32
|
+
// TODO: 使用暂不明确,以后再考虑
|
|
33
|
+
// {
|
|
34
|
+
// comment: '文件类型(mimetype 前半段,通常用于预览)',
|
|
35
|
+
// type: 'string',
|
|
36
|
+
// name: 'type',
|
|
37
|
+
// },
|
|
38
|
+
{
|
|
39
|
+
type: "string",
|
|
40
|
+
name: "mimetype"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
comment: "\u5B58\u50A8\u5F15\u64CE",
|
|
44
|
+
type: "belongsTo",
|
|
45
|
+
name: "storage"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
comment: "\u76F8\u5BF9\u8DEF\u5F84\uFF08\u542B\u201C/\u201D\u524D\u7F00\uFF09",
|
|
49
|
+
type: "string",
|
|
50
|
+
name: "path"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
comment: "\u5176\u4ED6\u6587\u4EF6\u4FE1\u606F\uFF08\u5982\u56FE\u7247\u7684\u5BBD\u9AD8\uFF09",
|
|
54
|
+
type: "jsonb",
|
|
55
|
+
name: "meta",
|
|
56
|
+
defaultValue: {}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
comment: "\u7F51\u7EDC\u8BBF\u95EE\u5730\u5740",
|
|
60
|
+
type: "string",
|
|
61
|
+
name: "url"
|
|
62
|
+
// formula: '{{ storage.baseUrl }}{{ path }}/{{ filename }}'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
module.exports = attachments_default;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var storages_default = {
|
|
4
|
+
namespace: "file-manager.storageSetting",
|
|
5
|
+
duplicator: "optional",
|
|
6
|
+
name: "storages",
|
|
7
|
+
title: "\u5B58\u50A8\u5F15\u64CE",
|
|
8
|
+
fields: [
|
|
9
|
+
{
|
|
10
|
+
title: "\u5B58\u50A8\u5F15\u64CE\u540D\u79F0",
|
|
11
|
+
comment: "\u5B58\u50A8\u5F15\u64CE\u540D\u79F0",
|
|
12
|
+
type: "string",
|
|
13
|
+
name: "title",
|
|
14
|
+
translation: true
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
title: "\u82F1\u6587\u6807\u8BC6",
|
|
18
|
+
// comment: '英文标识,用于代码层面配置',
|
|
19
|
+
type: "string",
|
|
20
|
+
name: "name",
|
|
21
|
+
unique: true
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
comment: "\u7C7B\u578B\u6807\u8BC6\uFF0C\u5982 local/ali-oss \u7B49",
|
|
25
|
+
type: "string",
|
|
26
|
+
name: "type"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
comment: "\u914D\u7F6E\u9879",
|
|
30
|
+
type: "jsonb",
|
|
31
|
+
name: "options",
|
|
32
|
+
defaultValue: {}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
comment: "\u6587\u4EF6\u89C4\u5219",
|
|
36
|
+
type: "jsonb",
|
|
37
|
+
name: "rules",
|
|
38
|
+
defaultValue: {}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
comment: "\u5B58\u50A8\u76F8\u5BF9\u8DEF\u5F84\u6A21\u677F",
|
|
42
|
+
type: "string",
|
|
43
|
+
name: "path",
|
|
44
|
+
defaultValue: ""
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
comment: "\u8BBF\u95EE\u5730\u5740\u524D\u7F00",
|
|
48
|
+
type: "string",
|
|
49
|
+
name: "baseUrl",
|
|
50
|
+
defaultValue: ""
|
|
51
|
+
},
|
|
52
|
+
// TODO(feature): 需要使用一个实现了可设置默认值的字段
|
|
53
|
+
{
|
|
54
|
+
comment: "\u9ED8\u8BA4\u5F15\u64CE",
|
|
55
|
+
type: "radio",
|
|
56
|
+
name: "default",
|
|
57
|
+
defaultValue: false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "boolean",
|
|
61
|
+
name: "paranoid",
|
|
62
|
+
defaultValue: false
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
module.exports = storages_default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const FILE_FIELD_NAME = "file";
|
|
4
|
+
const LIMIT_FILES = 1;
|
|
5
|
+
const DEFAULT_MAX_FILE_SIZE = 1024 * 1024 * 1024;
|
|
6
|
+
const STORAGE_TYPE_LOCAL = "local";
|
|
7
|
+
const STORAGE_TYPE_ALI_OSS = "ali-oss";
|
|
8
|
+
const STORAGE_TYPE_S3 = "s3";
|
|
9
|
+
const STORAGE_TYPE_TX_COS = "tx-cos";
|
|
10
|
+
|
|
11
|
+
exports.DEFAULT_MAX_FILE_SIZE = DEFAULT_MAX_FILE_SIZE;
|
|
12
|
+
exports.FILE_FIELD_NAME = FILE_FIELD_NAME;
|
|
13
|
+
exports.LIMIT_FILES = LIMIT_FILES;
|
|
14
|
+
exports.STORAGE_TYPE_ALI_OSS = STORAGE_TYPE_ALI_OSS;
|
|
15
|
+
exports.STORAGE_TYPE_LOCAL = STORAGE_TYPE_LOCAL;
|
|
16
|
+
exports.STORAGE_TYPE_S3 = STORAGE_TYPE_S3;
|
|
17
|
+
exports.STORAGE_TYPE_TX_COS = STORAGE_TYPE_TX_COS;
|