Unknow Server Error when Uploading Img
I use last library version 1.7.4 I using image uploading but i get "uknow server error" Image 340x425 With library version 1.7.2 i dont have this issue and posted img.
var mediaImage = new InstaImageUpload
{
// leave zero, if you don't know how height and width is it.
Height = 0,
Width = 0,
ImageBytes = targetFile.Item1, // byte[] Img
//Uri = imgData
};
var result = await _instagramClient.MediaProcessor.UploadPhotoAsync(mediaImage, SettingModel.Instance.PostData);
if (result.Succeeded)
{
Console.WriteLine("[" + DateTime.UtcNow.ToShortTimeString() + "] posted Img");
File.Delete(targetFile.Item2);
}
else
{
Console.WriteLine("[" + DateTime.UtcNow.ToShortTimeString() + $"] Unable to upload : {targetFile.Item2} " + result.Info.Message);
}
I have the same issue after upgrading to v1.7.4 - Error=Unknown: Unknown Server Error. Would be nice if we can get some feedback about how to fix it
Hello, I have the same issue in this version v1.7.4.
Hello, I have the same issue in this version v1.7.4. Any feedback about to fix it? I´m running on a console app with .net 7.
The problem is the newly generated GenerateRandomUploadId produces an id that causes ConfigureMediaPhotoAsync to fail.
Changing GenerateRandomUploadId back fixes this
internal static string GenerateRandomUploadId()
{
return DateTime.UtcNow.ToUnixTimeMiliSeconds().ToString();
// return GenerateUploadId();
}
a have same problem now so i will change version and error will be gone??
a have same problem now so i will change version and error will be gone??
This issue is in the latest version I believe. In ApiRequestMessage.cs just replace the return value in GenerateRandomUploadId with return DateTime.UtcNow.ToUnixTimeMiliSeconds().ToString(); in the source or use a version prior to this commit.
Getting the same issue. Can you please fix this in the next release? Currently using 1.7.2 to go around this issue. Thanks.