Upload.UploadMedia () not working
See original GitHub issueHi,
I’m using Tweetinvi v1.2 but Upload.UploadMedia always returns a system null reference exception.
Auth.ExecuteOperationWithCredentials ( Program.user, () =>
{
var binary = System.IO.File.ReadAllBytes ( "img.png" ); // Binary is fine
var media = Upload.UploadImage ( binary ); // Always returns "System null reference exception"
Tweet.PublishTweet ( "TEST", new PublishTweetOptionalParameters
{
Medias = new List<IMedia> { media }
} );
} );
Note: Analog methods to UploadMedia () ( like Upload.UploadBinary ) give all the same error output.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
How to Fix Image Upload Issue in WordPress (Step by Step)
open the Settings menu, and select Media. If you see a file path with a textbox displaying where the files should be uploaded...
Read more >WordPress Can't Upload Images? Here's How to Fix It
Issues Uploading Images to Your Media Library · 1. Go to the /wp-content/ folder after connecting to your website through FTP. · 2....
Read more >Help, WordPress Won't Let Me Upload My Images!
Trouble uploading images? See the most common causes & quickest solutions for WordPress.com. Plus, learn how to optimize images & manage ...
Read more >Can't Upload Images to WordPress Media Library?
The most common reasons your Media Library has stopped working properly are incompatible plugins and/or themes, WordPress HTTP error, and ...
Read more >Files upload but not in media library
Here is what happens: When you upload a file (pdf or jpg) from the media library OR from a page/post, it appears that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello thanks for your awsome package. I love that. but i have problem with uploading media. Sometimes throw exeption “Exception of type ‘Tweetinvi.Exceptions.TwitterNullCredentialsException’ was thrown.” and it dosent really even try to upload that. i get last version from nuget last night. please help me ❤️
I created a bug for you @ https://github.com/linvi/tweetinvi/issues/444