Skip to content
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

Upload not finalized on S3 #462

Closed
JanKups opened this issue Jul 27, 2023 · 1 comment
Closed

Upload not finalized on S3 #462

JanKups opened this issue Jul 27, 2023 · 1 comment

Comments

@JanKups
Copy link

JanKups commented Jul 27, 2023

I've setup the following for @tus/server together with @tus/s3-store:

const {Server} = require('@tus/server')
const {S3Store} = require('@tus/s3-store')

const s3Store = new S3Store({
  partSize: 8 * 1024 * 1024, // Each uploaded part will have ~8MB,
  s3ClientConfig: {
    bucket: process.env.AWS_BUCKET,
    region: process.env.AWS_REGION,
    credentials: {
      accessKeyId: process.env.AWS_ACCESS_KEY_ID,
      secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY,
    },
  },
})
const server = new Server({path: '/uploads', datastore: s3Store})

const uploadApp = express();
uploadApp.all("*", tusServer.handle.bind(tusServer));

app.use(
  "/uploads",
  passport.authenticate("jwt", { session: false }),
  uploadApp
);

I'm using tus-js-client on the frontend, setup as in the example.

When uploading to S3 the file is successfully send and the browser received the "onSuccess" message. However the files are placed in S3 as follows:

CleanShot 2023-07-27 at 16 02 18

It looks as if the upload is not finalized (from what I know about multiuploads with CompleteMultipartUploadCommand). Am I missing something, or can the passport auth cause an issue?

@Murderlon
Copy link
Member

Likely a duplicate of #415. Taking a look next week.

@Murderlon Murderlon closed this as not planned Won't fix, can't repro, duplicate, stale Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants