Jump to content
Fuandi

Amazon S3 upload to folder inside bucket

Recommended Posts

Hi all,

Currently i'm able to upload a file from my local drive to amazon s3 bucket.  But when I want to upload it into the folder inside the bucket, it will give me error.

Anyone can help ?

 

let say the bucket name is bucket1

and the folder inside that bucket is folder1

 

I tried this

        Service.UploadObject('bucket1/folder1', ExtractFileName(fileName), bytes, TRUE, nil, nil, amzbaPrivate, info);
 

 

 

Share this post


Link to post

Hi

 

Bucket name is different from folder name, you have to call it as

 

Service.UploadObject(bucketName, folderName + '/' + objectName, ...

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×