R
R
Raybul2022-02-19 23:14:48
Amazon Web Services
Raybul, 2022-02-19 23:14:48

How to make folder navigation in AWS s3 bucket?

I need to create a folder for a specific user, for example, the user has uploaded a picture and it is necessary that a folder is created in the bucket, for example, with the name of this user's id and the picture has already been saved in it, how to implement it?
nodeJs, aws-sdk

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Raybul, 2022-02-20
@Raybul

For some reason I thought that I needed to create a folder, but it turned out that I just needed to put it)) thanks!
const params = {
Bucket: process.env.BUCKET_NAME,
Key: `${userId}/${filesType}/${file.name}`,
Body: file.data,
};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question