Skip to content

Commit

Permalink
Do a better job of picking filename from upload s3 objectkey
Browse files Browse the repository at this point in the history
  • Loading branch information
underbluewaters committed Nov 17, 2024
1 parent 2bd0a2a commit d9df296
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/spatial-uploads-handler/src/handleUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ export default async function handleUpload(
const isTif = ext === ".tif" || ext === ".tiff";

// Step 1) Fetch the uploaded file from S3
let workingFilePath = `${path.join(tmpobj.name, objectKey.split("/")[1])}`;
const keyParts = objectKey.split("/");
let workingFilePath = `${path.join(
tmpobj.name,
keyParts[keyParts.length - 1]
)}`;
await updateProgress("running", "fetching", 0.0);
await getObject(
workingFilePath,
Expand Down

0 comments on commit d9df296

Please sign in to comment.