InstagramApiSharp
InstagramApiSharp copied to clipboard
"int too big to convert" on uploading media
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
andScreenshots
sections)!
I've:
- [x] {Searched} in Issues
- [x] {Checked} Example projects
- [x] {Read} wiki pages
- [ ] Not sure
Issue category
- [ ] Bug
- [ ] Feature Request
- [ ] Missing Feature
- [ ] Question
- [x] Not sure
Language
- [x] C#
- [ ] VB.NET
Usage
- [ ] Windows Form/Console app
- [ ] WPF app
- [ ] Asp .NET MVC
- [x] Asp .NET Core
- [ ] Universal Windows Platform [UWP]
- [ ] Xamarin or Xamarin Forms
- [ ] Mono
- [ ] Other
Operating System
- [ ] Windows
- [ ] Windows Server
- [ ] Linux
- [x] Mac OS
- [ ] Other
Describe your issue
this is how i try to add image var mediaImage = new InstaImageUpload {
Height = 0,
Width = 0,
Uri = @"ali.jpg"
};
var result = await api.MediaProcessor.UploadPhotoAsync(mediaImage, "COMMENT");
Screenshots
Hello, were you able to solve the problem?
I am also facing the same issue in .net core.
I was able to solve it this way.
@fancifulcoder I am still facing the same error. Though If I use the repository examples project it works for me seems like some library is missing for me.
@fancifulcoder or @SailleshPawar did you come up with a solution? I'm facing the same error. I'm using a jpg of 115kb, so it's already very small.
@rickmsg79 I just stopped using this library due to no support of .NET core.
If you use the sample project in the repo and use the required dependencies then it works fine,
@SailleshPawar thanks! what do you end up using for net core? another library?
got the warning from instagram that the account will be blocked so stopped using it and stopped the poc for now.
I have the same problem here, however, I decided to create my own service within my project, which handles the entire oAuth flow until sending the media.
There is no way to depend on this component.
To fix the error, I did this in the source code I received...
The method was returning a very large number that should just be an integer for Instagram.
This way it worked, if they accept a PullRequest I can even send it, but for now I'm using it this way for myself.
Hi,
Sorry to all of you, I don't check this repository regularly,
I'll update uploading parts (story/video/DM/reels)
in next few weeks as a gift to all of you.
Also ReelsProcessor added in case if someone uses it. Thanks for contributing.
Regards.