First thanks for writing this perl package, it's very useful.
I'm testing the various types of Tumblr posts (http://www.tumblr.com/docs/en/api/v2#posting) and the post of type video and audio failed when I pass an array in the data field. Tumblr responds with an error: Error uploading video file. (code:400)
In their documentation, the data field is not supposed to be an array like for a photo post.
So I tried by changing your code, in Tumblr.pm function _oauth_request from:
my $post = $blog->post(
type => 'video',
data => '/home/david/larry.mp4' , # not an array here, just a literal string
caption => 'Larry David video'
);
it works fine. Same for audio post.
If you agree with my fix, please integrate it in your official CPAN package.
First thanks for writing this perl package, it's very useful.
I'm testing the various types of Tumblr posts (http://www.tumblr.com/docs/en/api/v2#posting) and the post of type video and audio failed when I pass an array in the data field. Tumblr responds with an error: Error uploading video file. (code:400)
In their documentation, the data field is not supposed to be an array like for a photo post.
So I tried by changing your code, in Tumblr.pm function _oauth_request from:
to
and now when using such blog post method:
my $post = $blog->post( type => 'video', data => '/home/david/larry.mp4' , # not an array here, just a literal string caption => 'Larry David video' );
it works fine. Same for audio post.
If you agree with my fix, please integrate it in your official CPAN package.
Warm regards,
Emmanuel