[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

已提问 3 年前369 查看次数
1 回答
0

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

已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则