[iOS] Why is Amplify upload to S3 failing?

0

When I upload .png files/regular photos, the upload is successful. But when I try to upload live photos (.pvt) or videos, I get no response, followed by the following, and I'm not sure why:

Failed: The HTTP response status code is 400.. TODO some status code to recovery message mapper.
For more information on HTTP status codes, take a look at
https://en.wikipedia.org/wiki/List_of_HTTP_status_codes

My code is below:

    Amplify.Storage.uploadFile(  
        key: fileNameKey,  
        local: url,  
        progressListener: { progress in  
            print("Progress: \(progress)")  
        }, resultListener: { event in  
            switch event {  
            case let .success(data):  
                print("Completed: \(data)")  
            case let .failure(storageError):  
                print("Failed: \(storageError.errorDescription). \(storageError.recoverySuggestion)")  
            }  
        }  
    )  

Edited by: Bradalee on Mar 3, 2021 8:25 AM

asked 3 years ago364 views
1 Answer
0

Live photos urls are folders; needed to upload the individual files within the folder.

answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions