[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

gefragt vor 3 Jahren369 Aufrufe
1 Antwort
0

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

beantwortet vor 3 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen