Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
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?

about 4 years ago · Santiago Trujillo
1 answers
Answer question

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.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!