large-video-upload-python icon indicating copy to clipboard operation
large-video-upload-python copied to clipboard

This should cover more than just "video"

Open andypiper opened this issue 6 years ago • 1 comments

Add instructions - or modify code with comment blocks - to enable this to easily be modified for large images, GIFs, or other video.

andypiper avatar Oct 24 '18 04:10 andypiper

Hi @andypiper, thanks for such a great example! I tried to tweet some large images and GIFs using this code, and I successfully modified it for the same. The only change that was required was -

            request_data = {
                'command': 'INIT',
                'media_type': 'image/gif',
                'total_bytes': self.total_bytes,
                'media_category': 'tweet_gif'
            }

for GIFs and -

             request_data = {
                'command': 'INIT',
                'media_type': 'image/png',
                'total_bytes': self.total_bytes,
                'media_category': 'tweet_image'
            }

for images. If possible and if correct, I will be happy to add these as comments in the codebase:), if not then I'll be leaving it here for anyone who is looking for it.

Saransh-cpp avatar Jun 27 '21 20:06 Saransh-cpp