-
-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature(director): s3 update, make it compatible with other providers #806
base: master
Are you sure you want to change the base?
Conversation
}; | ||
const url = parseUrl(`${S3_URL}/${S3_BUCKET}/${key}`); | ||
|
||
const signedGetUrlObject = await presigner.presign( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-8-z This one is going to be stored in the DB and used for all subsequent reads. does it have an expiration?
import { | ||
S3_ACL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-8-z can you please elaborate - was it deprecated or smth?
S3_BUCKET, | ||
S3_FORCE_PATH_STYLE, | ||
S3_IMAGE_KEY_PREFIX, | ||
S3_READ_URL_PREFIX, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@p-8-z I believe some users wants the read url to be completely different from the write S3 bucket because, probably we'd keep it?
@p-8-z thanks a lot for this contribution and the documentation. Please see the inline comments with a few questions, |
@agoldis my first intention was to align url singing so even the Download URL could be sign so the resources are not just publicly available. So what this means is that with current architecture of storing Download URL after Uploading this is not possible. My question is, is it possible to split this logic of uploading and downloading? |
@p-8-z sequenceDiagram
box Purple Write
participant cypress
participant director
participant DB
end
box Green Read
participant S3
participant browser
participant API
end
cypress->>director: post artifacts
director->>DB: save S3 object URL
director-->>cypress: upload url
cypress->>S3: upload
browser->>API: get entity with artifacts
API->>API: generate signed URL
API-->>browser: signed URL
browser->>S3: get object via signed URL
S3-->>browser: object
|
I'm super grateful for your work @p-8-z thanks ! |
I've update aws sdk to latest version and made director/screenshots/s3 package compatible with other providers.
References
Use case
Example
Tested against Oracle S3 compatibility API