Coder Social home page Coder Social logo

grumi's People

Contributors

strafe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

grumi's Issues

Investigate API changes

  • Imgur now seems to support two additional video formats (video/mp4 & video/quicktime).

    • Previously, video/mp4 was supported but only when uploaded using the https://imgur.com website.
  • Images are no longer limited to 1MB, instead there is now a 20MB maximum.

    • GIFs no longer follow the image size restriction, and instead use the video size restriction.
    • PNGs over 5MB are converted to JPEG (why?).
  • Videos are no longer limited to 30 seconds, instead there is now a 60 second limit.


Note that the current API docs still state:

image - A binary file, base64 data, or a URL for an image. (up to 10MB)
video - A binary file (up to 200MB)

Introduce local sanity checks to reduce waiting time

There are a number of errors the API can return that could be avoided by local sanity checks before attempting to upload:

  • File size. Images (including animated ones) are limited to 10MB. Videos are limited to 200MB.
  • MIME type.
    • Image: image/jpeg, image/gif, image/apng, image/tiff & image/png.
    • Video: video/mp4, video/webm, video/x-matroska, video/quicktime, video/x-flv, video/x-msvideo, video/x-ms-wmv & video/mpeg.
  • Video length. Videos are limited to 60 seconds in length, regardless of their file size. Use ffprobe if available.

Drop jq as a dependancy

It shouldn't be too difficult to parse error messages through RegEx, and since this is all that jq is used for it may be worth trying to drop it. Shell script dependencies aren't fun on a lot of operating systems.

Video uploads do not work

The process will hang for roughly a minute, before printing a failed to upload message with no reason.

$ grumi video.webm
Error uploading video.webm ()
No images uploaded.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.