Skip to content
Snippets Groups Projects
Commit 366ecf4c authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Resolve "Update buggy AWS SDK version"

parent 0b1ce28b
No related branches found
No related tags found
2 merge requests!84Remove development branch,!65Resolve "Update buggy AWS SDK version"
...@@ -14,7 +14,6 @@ default: ...@@ -14,7 +14,6 @@ default:
before_script: before_script:
- npm --version # For debugging - npm --version # For debugging
- npm install --no-fund - npm install --no-fund
- npm update --no-fund
lint: lint:
stage: test stage: test
......
This diff is collapsed.
...@@ -76,7 +76,6 @@ async function uploadObject() { ...@@ -76,7 +76,6 @@ async function uploadObject() {
Key: key, Key: key,
}, },
queueSize: 4, // optional concurrency configuration queueSize: 4, // optional concurrency configuration
partSize: 1024 * 1024 * 5, // optional size of each part, in bytes, at least 5MB
leavePartsOnError: false, // optional manually handle dropped parts leavePartsOnError: false, // optional manually handle dropped parts
}); });
......
...@@ -28,7 +28,6 @@ import { ...@@ -28,7 +28,6 @@ import {
GetObjectCommand, GetObjectCommand,
} from "@aws-sdk/client-s3"; } from "@aws-sdk/client-s3";
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
import { awsAuthMiddlewareOptions } from "@aws-sdk/middleware-signing";
import { useAuthStore } from "@/stores/users"; import { useAuthStore } from "@/stores/users";
import { useBucketStore } from "@/stores/buckets"; import { useBucketStore } from "@/stores/buckets";
import { environment } from "@/environment"; import { environment } from "@/environment";
...@@ -38,34 +37,18 @@ const authStore = useAuthStore(); ...@@ -38,34 +37,18 @@ const authStore = useAuthStore();
const bucketRepository = useBucketStore(); const bucketRepository = useBucketStore();
const keyRepository = useS3KeyStore(); const keyRepository = useS3KeyStore();
const middleware = [ const client = computed<S3Client>(
// eslint-disable-next-line @typescript-eslint/ban-ts-comment () =>
// @ts-ignore new S3Client({
(next) => async (args) => { region: "us-east-1",
args.request.headers["host"] = environment.S3_URL.split("://")[1]; endpoint: environment.S3_URL,
return await next(args); forcePathStyle: true,
}, credentials: {
{ accessKeyId: keyRepository.keys[0]?.access_key ?? "",
relation: "before", secretAccessKey: keyRepository.keys[0]?.secret_key ?? "",
toMiddleware: awsAuthMiddlewareOptions?.name ?? "impossible", },
}, }),
]; );
const client = computed<S3Client>(() => {
const client = new S3Client({
region: "us-east-1",
endpoint: environment.S3_URL,
forcePathStyle: true,
credentials: {
accessKeyId: keyRepository.keys[0]?.access_key ?? "",
secretAccessKey: keyRepository.keys[0]?.secret_key ?? "",
},
});
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
client.middlewareStack.addRelativeTo(middleware[0], middleware[1]);
return client;
});
// Constants // Constants
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
...@@ -640,9 +623,6 @@ function getObjectFileName(key: string): string { ...@@ -640,9 +623,6 @@ function getObjectFileName(key: string): string {
:readonly="false" :readonly="false"
:deletable="false" :deletable="false"
:back-modal-id="undefined" :back-modal-id="undefined"
@permission-created="
(newPermission) => (objectState.createdPermission = newPermission)
"
/> />
<button <button
v-if="!authStore.foreignUser" v-if="!authStore.foreignUser"
...@@ -665,7 +645,6 @@ function getObjectFileName(key: string): string { ...@@ -665,7 +645,6 @@ function getObjectFileName(key: string): string {
:bucket-name="props.bucketName" :bucket-name="props.bucketName"
:sub-folders="folderStructure" :sub-folders="folderStructure"
modalID="permission-list-modal" modalID="permission-list-modal"
:add-permission="objectState.createdPermission"
/> />
</div> </div>
</div> </div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment