AWS S3 ParameterCollection class

0

I am using AWS S3 .NET SDK for presigning the image url, I need to add 4 custom parameters part of the image request. when i add the parameters using amazon S3 Paremetercollection object, it appends "X-" to the key that i add into parameter collection, External application also uses my presigned url and trying to add few more params but those are not having "X-". Because of this presignedurl sigtnature mistmatch arises, is there a way i can skip the appending of "X-"

this is the AWS s3 parameter collection class https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Services/S3/Custom/Model/ParameterCollection.cs

The x- is added to the parameter key in the ParameterCollection.cs file:

public string this[string name] { get { if (!name.StartsWith("x-", StringComparison.OrdinalIgnoreCase)) name = "x-" + name;

    string value;
    if (values.TryGetValue(name, out value))
      return value;

    return null;
  }
  set {
    if (!name.StartsWith("x-", StringComparison.OrdinalIgnoreCase))
      name = "x-" + name;

    values[name] = value;
  }
}
akhuser
feita há 2 anos143 visualizações
Sem respostas

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas