-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
While using the following code block
``
try
{
var query = new UploadQuery
{
Filepath = tempFilePath,
BrandId = _brandId, // Use the first available brand for this example
Name = asset.FileName,
//CustomParameters = customParameters,
OriginalFileName = asset.PhysicalFileName,
Description = UrlEncoder.Default.Encode(asset.ProductName),
};
query.MetapropertyOptions = new Dictionary<string, IList<string>>
{
{ "New_Color_code", new List<string> { asset.ColorCode } },
{ "viewType", new List<string> { asset.ViewType } },
{ "brand", new List<string> { asset.BrandName } },
{ "Collection", new List<string> { asset.Collection } },
// { "colorCodeDescription", new List<string> { asset.ColorCodeDescription } },
{"Asset_type", new List<string> { "Images" } },
{"Asset_Subtype", new List<string> { asset.ViewType} },
{"17nr", asset.ProductID },
{"EAN_UPC", asset.EAN },
// {"variantId", asset.VariantID },
{"Product_Name_", new List<string> { asset.ProductName } }
};
//upload
_assetService.UploadFileAsync(query).Wait();
}
catch (Exception ex)
{
Console.WriteLine("Exception occurred while uploading to Bynder: " + ex.Message);
}
finally
{
if (File.Exists(tempFilePath))
{
File.Delete(tempFilePath);
}
}
``
I receive the following error
Response status code does not indicate success: 400 (Bad Request)
All the variables are fed to the best of my knowledge and to the extent of available documentation. Why is this throwing an issue?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels