We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a function which uploads the photo and returns the media.code from docs.
const upload_photo = async (client, path, caption, post) => { const { media } = await client.uploadPhoto({ photo: path, caption: caption, post: post}); return media.code; };
When I try to upload it from this function, I get this error message:
UnhandledPromiseRejectionWarning: StatusCodeError: 400 - "{\"debug_info\":{\"retriable\":false,\"type\":\"ParameterValidationError\",\"message\":\"Header Content-Length has invalid value\"}}"
Uploading my images from a path like this: ./path/to/my/image.jpg Tried to changing caption length, didnt work. Whats wrong? Thank you.
./path/to/my/image.jpg
The text was updated successfully, but these errors were encountered:
I got The same issue, have you fixed that? maybe?
Sorry, something went wrong.
@gamerstop Sorry for late response,
I solved it with converting the image by buffer and uploading it as a buffer (which i got it in #206).
No branches or pull requests
I have a function which uploads the photo and returns the media.code from docs.
When I try to upload it from this function, I get this error message:
UnhandledPromiseRejectionWarning: StatusCodeError: 400 - "{\"debug_info\":{\"retriable\":false,\"type\":\"ParameterValidationError\",\"message\":\"Header Content-Length has invalid value\"}}"
Uploading my images from a path like this:
./path/to/my/image.jpg
Tried to changing caption length, didnt work. Whats wrong? Thank you.
The text was updated successfully, but these errors were encountered: