Comments (7)
"Media uploads for images are limited to 5MB in file size, and for videos are limited to 15MB. For chunked uploads, the maximum chunk size is 5MB." -- https://dev.twitter.com/rest/reference/post/media/upload
So macaw might be over the limit if it's sending base64 media_data
.
from macaw-enyo.
The wording of
https://dev.twitter.com/rest/reference/post/media/upload-chunked implies
that even a chunked image has a total maximum size of 5MB. I'm not sure
if I am reading that correctly though.
On 08/19/15 15:50, Ralph Giles wrote:
"Media uploads for images are limited to 5MB in file size, and for
videos are limited to 15MB. For chunked uploads, the maximum chunk size
is 5MB." -- https://dev.twitter.com/rest/reference/post/media/uploadSo macaw might be over the limit if it's sending base64 |media_data| and
not chunking.—
Reply to this email directly or view it on GitHub
#76 (comment).
from macaw-enyo.
Yes, I think you're right. Presumedly that's per-image. Maybe 5MB < 4.4MB because of inconsistent units?
from macaw-enyo.
On 08/19/15 15:57, Ralph Giles wrote:
Yes, I think you're right. Presumedly that's per-image. Maybe 5MB <
4.4MB because of inconsistent units?—
Reply to this email directly or view it on GitHub
#76 (comment).That seems likely to me.
I suspect that twitter wants the client to resize the image before
sending it. I'm not sure how I can do that in this case. This may take
some experimentation.
from macaw-enyo.
I suppose you can draw it into a hidden canvas element? How does the thumbnailing work?
https://hacks.mozilla.org/2011/01/how-to-develop-a-html5-image-uploader/
canvas.toBlob() looks like the most efficient interface for getting the new jpeg data for upload.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob
from macaw-enyo.
That is basically what the thumbnail does. That is a possibility but it
doesn't give me a great deal of control over the final size.
On Aug 20, 2015 7:53 AM, "Ralph Giles" [email protected] wrote:
I suppose you can draw it into a hidden canvas element? How does the
thumbnailing work?https://hacks.mozilla.org/2011/01/how-to-develop-a-html5-image-uploader/
canvas.toBlob() looks like the most efficient interface for getting the
new jpeg data for upload.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toBlob—
Reply to this email directly or view it on GitHub
#76 (comment).
from macaw-enyo.
Media in my timeline on the website is all scaled to 600px width. So if you downsample to 1280 (or even 1920) as a maximum dimension it should be considerably smaller that 5MB as a jpeg and still display with reasonable quality.
Maybe do a loop to explore a few options. Try converting png to png, jpeg to jpeg. If the result is too large (Blob.size) try again with a lower jpeg quality, or with jpeg instead of png, or halve the dimensions.
from macaw-enyo.
Related Issues (20)
- compose text escape compose dialog HOT 1
- [Firefox OS Simulator v2.0, v2.1, v2.2, v3.0] No connection to Twitter HOT 6
- Problems with 'Redirecting you back to the application' and minego.net HOT 2
- Reply message to my own tweets contain a ' ' at the beginning
- Support of group DM
- Suggestion: move refresh button somewhere to the bottom HOT 1
- Non standard license make it impossible to contribute HOT 7
- Clicking on links doesn't work any more in Firefos OS master HOT 1
- Horizontal swipe too sensitive HOT 2
- Editing tweet isn't possible....
- Timeline view should allow to get more tweets.
- Timeline should be persistent
- Current version broken with latest Gecko (Firefox OS) HOT 1
- Cannot scroll in text box when writing tweet HOT 1
- Scrolling lags on Firefox OS 2.5 HOT 4
- I cannot click on @links
- Can't reply to tweet HOT 1
- Volume rocker wreck havoc.
- Localized tweet appearing as blocks on Twitter
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from macaw-enyo.