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
gefragt vor 2 Jahren143 Aufrufe
Keine Antworten

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