[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년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠