feat: add support for S3 as a storage provider (#659)
* add s3 * instance the s3 client dynamically * refactor code * fix format * add docs * add docs * fix issue with s3 upload if you use the base path, fix issue with archiving -> disable archiving for s3 * split file service in local and s3 file service and fix s3 upload chunking * add working download/view * add new features to local service (from main branch) * revert s3 service and add working delete/remove functionality * refactor s3 service * Update backend/src/file/s3.service.ts Co-authored-by: Elias Schneider <login@eliasschneider.com> * Update frontend/src/components/admin/configuration/ConfigurationNavBar.tsx Co-authored-by: Elias Schneider <login@eliasschneider.com> * Update docs/docs/setup/s3.md Co-authored-by: Elias Schneider <login@eliasschneider.com> * Update backend/prisma/seed/config.seed.ts Co-authored-by: Elias Schneider <login@eliasschneider.com> * add note for ZIP archive in docs * create logger instance * make s3 instance dynamic * add icon import * remove console.logs * add correct pdf viewing format * add storage provider to share * refactor: run formatter * chore: add prisma migration * fix: don't expose `storageProvider` * chore: improve config variables description --------- Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
@@ -16,7 +16,7 @@ import {
|
||||
TbMail,
|
||||
TbShare,
|
||||
TbSocial,
|
||||
TbSquare,
|
||||
TbBucket,
|
||||
TbBinaryTree,
|
||||
TbSettings,
|
||||
} from "react-icons/tb";
|
||||
@@ -29,6 +29,7 @@ const categories = [
|
||||
{ name: "SMTP", icon: <TbAt /> },
|
||||
{ name: "OAuth", icon: <TbSocial /> },
|
||||
{ name: "LDAP", icon: <TbBinaryTree /> },
|
||||
{ name: "S3", icon: <TbBucket /> },
|
||||
];
|
||||
|
||||
const useStyles = createStyles((theme) => ({
|
||||
|
||||
@@ -436,6 +436,21 @@ export default {
|
||||
"admin.config.ldap.field-name-member-of.description": "LDAP-Attributname für die Gruppen, in denen ein Benutzer Mitglied ist. Dies wird bei der Überprüfung der Admin-Gruppe verwendet.",
|
||||
"admin.config.ldap.field-name-email": "Attributname für die E-Mail-Adresse des Benutzers",
|
||||
"admin.config.ldap.field-name-email.description": "LDAP-Attributname für die E-Mail-Adresse eines Benutzers.",
|
||||
"admin.config.category.s3": "S3",
|
||||
"admin.config.s3.enabled": "Aktiviert",
|
||||
"admin.config.s3.enabled.description": "Ob S3 verwendet werden soll, um die freigegebenen Dateien anstelle des lokalen Dateisystems zu speichern.",
|
||||
"admin.config.s3.endpoint": "Endpunkt",
|
||||
"admin.config.s3.endpoint.description": "Die URL des S3-Buckets.",
|
||||
"admin.config.s3.region": "Region",
|
||||
"admin.config.s3.region.description": "Die Region des S3-Buckets.",
|
||||
"admin.config.s3.bucket-name": "Bucket-Name",
|
||||
"admin.config.s3.bucket-name.description": "Der Name des S3-Buckets.",
|
||||
"admin.config.s3.bucket-path": "Pfad",
|
||||
"admin.config.s3.bucket-path.description": "Der Standardpfad, der zum Speichern der Dateien im S3-Bucket verwendet werden soll.",
|
||||
"admin.config.s3.key": "Schlüssel",
|
||||
"admin.config.s3.secret": "Geheimnis",
|
||||
"admin.config.s3.key.description": "Der Schlüssel, der den Zugriff auf den S3-Bucket ermöglicht.",
|
||||
"admin.config.s3.secret.description": "Das Geheimnis, das den Zugriff auf den S3-Bucket ermöglicht.",
|
||||
"admin.config.notify.success": "Configuration updated successfully.",
|
||||
"admin.config.notify.logo-success": "Logo updated successfully. It may take a few minutes to update on the website.",
|
||||
"admin.config.notify.no-changes": "No changes to save.",
|
||||
|
||||
@@ -626,6 +626,22 @@ export default {
|
||||
"Logo updated successfully. It may take a few minutes to update on the website.",
|
||||
"admin.config.notify.no-changes": "No changes to save.",
|
||||
|
||||
"admin.config.category.s3": "S3",
|
||||
"admin.config.s3.enabled": "Enabled",
|
||||
"admin.config.s3.enabled.description": "Whether S3 should be used to store the shared files instead of the local file system.",
|
||||
"admin.config.s3.endpoint": "Endpoint",
|
||||
"admin.config.s3.endpoint.description": "The URL of the S3 bucket.",
|
||||
"admin.config.s3.region": "Region",
|
||||
"admin.config.s3.region.description": "The region of the S3 bucket.",
|
||||
"admin.config.s3.bucket-name": "Bucket name",
|
||||
"admin.config.s3.bucket-name.description": "The name of the S3 bucket.",
|
||||
"admin.config.s3.bucket-path": "Path",
|
||||
"admin.config.s3.bucket-path.description": "The default path which should be used to store the files in the S3 bucket.",
|
||||
"admin.config.s3.key": "Key",
|
||||
"admin.config.s3.key.description": "The key which allows you to access the S3 bucket.",
|
||||
"admin.config.s3.secret": "Secret",
|
||||
"admin.config.s3.secret.description": "The secret which allows you to access the S3 bucket.",
|
||||
|
||||
// 404
|
||||
"404.description": "Oops this page doesn't exist.",
|
||||
"404.button.home": "Bring me back home",
|
||||
|
||||
Reference in New Issue
Block a user