question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upload.UploadMedia () not working

See original GitHub issue

Hi,

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:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
poryadelcommented, Jan 22, 2017

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 ❤️

0reactions
linvicommented, Jan 23, 2017
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found