Skip to content
This repository was archived by the owner on Dec 7, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface Config {
socketTimeoutSeconds?: number;
maxEntrySizeBytes?: number;
allowGccDepfiles?: boolean;

s3Prefix?: string;
asyncUpload?: {
enabled?: boolean;
maxPendingUploadMB?: number;
Expand Down
8 changes: 4 additions & 4 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export function startServer(s3: AWS.S3, config: Config, onDoneInitializing: () =
} else {
const s3request = s3.getObject({
Bucket: config.bucket,
Key: s3key
Key: config.s3Prefix + s3key
}).promise();

s3request
Expand Down Expand Up @@ -300,7 +300,7 @@ export function startServer(s3: AWS.S3, config: Config, onDoneInitializing: () =
const streamedBody = fs.createReadStream(pth);
const s3request = s3.upload({
Bucket: config.bucket,
Key: s3key,
Key: config.s3Prefix + s3key,
Body: streamedBody,
// Very important: The bucket owner needs full control of the uploaded
// object, so that they can share the object with all the appropriate
Expand Down Expand Up @@ -351,7 +351,7 @@ export function startServer(s3: AWS.S3, config: Config, onDoneInitializing: () =
} else {
const s3request = s3.headObject({
Bucket: config.bucket,
Key: s3key
Key: config.s3Prefix + s3key
}).promise();

s3request
Expand All @@ -375,7 +375,7 @@ export function startServer(s3: AWS.S3, config: Config, onDoneInitializing: () =

const s3request = s3.deleteObject({
Bucket: config.bucket,
Key: s3key
Key: config.s3Prefix + s3key
}).promise();

s3request
Expand Down