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

Posting gif from local file #235

Closed
ghost opened this issue Nov 10, 2023 · 1 comment
Closed

Posting gif from local file #235

ghost opened this issue Nov 10, 2023 · 1 comment

Comments

@ghost
Copy link

ghost commented Nov 10, 2023

Are gifs only uploadable through a url? Uploading a local gif through the api seems to always throw a HTTP 400 while urls to a gif go through. Normal images such as png/jpg work as expected using the snip.

 await client.createPost('my-blog-name', {
 	content: [{
 		type: 'image',
 		media: fs.createReadStream('/path/to/gif')
 	}],
});
@ghost ghost changed the title Posting gifs Posting gif from local file Nov 10, 2023
@ghost
Copy link
Author

ghost commented Nov 10, 2023

Oops. Looks like the issue specifically was the size of the gif. I tried a drastically smaller gif and works as expected.

@ghost ghost closed this as completed Nov 10, 2023
This issue was closed.
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

0 participants