Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle is missing #612

Open
24 tasks
ponmetkilastu opened this issue May 26, 2024 · 0 comments
Open
24 tasks

handle is missing #612

ponmetkilastu opened this issue May 26, 2024 · 0 comments

Comments

@ponmetkilastu
Copy link

Important note

  • You must fill this form! If you don't fill it, your issue will be close immediately.
  • Put an X character between [ ] that is related to your issue, like [x]
  • Please remove Important note from this form!
  • Don't remove other sections (unless it's unnecessarily, like Debug logs and Screenshots sections)!

I've:

Issue category

  • Bug
  • Feature Request
  • Missing Feature
  • Question
  • Not sure

Language

  • C#
  • VB.NET

Usage

  • Windows Form/Console app
  • WPF app
  • Asp .NET MVC
  • Asp .NET Core
  • Universal Windows Platform [UWP]
  • Xamarin or Xamarin Forms
  • Mono
  • Other

Operating System

  • Windows
  • Windows Server
  • Linux
  • Mac OS
  • Other

Debug logs

If your issue has an debug log, post it here, unless remove this section!

Describe your issue

Please type your issue here.

Screenshots

If you have screenshots, you can post it here. unless remove this section!

I get the error "Handle is missing" when uploading photos. what is the solution?

public async Task UploadPhotoAsync()
{
string photoPath = @"C:\Users\users\Desktop\asdas\1.jpeg";

var api = await LoadSessionData("session.dat", "username", "password");


if (api == null || !api.IsUserAuthenticated)
{
    throw new Exception("auth errorr");
}

if (!File.Exists(photoPath))
{
    throw new FileNotFoundException($"The photo file at {photoPath} does not exist.");
}

var mediaImage = new InstaImageUpload
{
    Height = 360,
    Width = 360,
    Uri = photoPath
};

var result =  await api.MediaProcessor.UploadPhotoAsync(mediaImage, "good");



if (result.Succeeded)
{
    richTextBox1.AppendText("success");
}
else
{
    richTextBox1.ScrollToCaret();
    richTextBox1.AppendText($"Failed to upload photo: {result.Info.Message}");
    richTextBox1.ScrollToCaret();
}

} output Ş Failed to upload photo: message: "Handle is missing."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant