Skip to content

iOS: Unable to set ACL's for files being uploaded to S3 #1625

Open
@mazhigbee-pb

Description

@mazhigbee-pb

Describe the bug

I am unable to set the ACL public-read from my iOS application while uploading a photo using Amplify.Storage.uploadData. This S3 bucket is an existing resource and therefor I cannot use the Amplify CLI to configure the bucket.

All images that are uploaded using the accessLevels guest public & private are un-viewable publicly.

Similarly our web client uses the S3 SDK and has an option to set the ACL during upload:

s3.upload({
          Key: filename,
          Body: file,
          ContentType: file.type,
          ACL: "public-read"
        })

Is there a way to obtain this result using the Amplify SDK? Or any other options I could try that don't involve changing permissions on the bucket?

Steps To Reproduce

Attempt to upload an image that requires a public ACL from the iOS Amplify SDK.

Expected behavior

I should be able to set the ACL of a file to 'public-read' or whatever the required permission is from the Amplify SDK.

Amplify Framework Version

1.19.2

Amplify Categories

Storage

Dependency manager

Swift PM

Swift version

5.2

CLI version

4.4

Xcode version

13.3

Is this a regression?

Yes

Device

iPhone 13 Simulator

iOS Version

iOS 13.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestRequest a new featurestorageIssues related to the Storage category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions