Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

122
Visualizações
Blank custom metadata when uploading file to AWS S3 using iOS SDK

I'm uploading a file to S3 from iOS using AWSS3TransferUtility and trying to set come custom metadata on the file. I'm testing it using the metadata key X-Amz-Meta-uploadParameters and the value "Test".

It appears correctly in the request headers:

... &X-Amz-Expires=2999&X-Amz-Meta-uploadParameters=Test&X-Amz-Security-Token= ...

Something is clearly happening, since after upload the key uploadparameters does appear in the object's properties in the S3 console, but with a blank value. To double-check I used s3api --head-object from the CLI and here's what's returned:

{
    "AcceptRanges": "bytes",
    "LastModified": "Thu, 16 Mar 2017 08:04:41 GMT",
    "ContentLength": 1331730,
    "ETag": "\"[hex data here]\"",
    "ContentType": "image/jpeg",
    "Metadata": {
        "uploadparameters": ""
    }
}

Here's how I'm setting the value up for the AWSS3TransferUtilityUploadExpression:

        let params = [
            "X-Amz-Meta-uploadParameters": "Test"
        ]

        //Copy the custom Meta information into the expression
        for (key, value) in params {
            expression.setValue(value, forRequestParameter: key)
        }

Having played around with all kinds of variations I'm still no closer to setting actual metadata. What am I missing here?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Fixed. After posting this question I continued tweaking things in frustration and stumbled across the answer.

Altering the key to all lower case is the magic twist, i.e. x-amz-meta-uploadparameters rather than X-Amz-Meta-uploadParameters. Incidentally, it also fails with X-Amz-Meta-uploadparameters.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda