imgur

How to upload video from the API imgur

别说谁变了你拦得住时间么 提交于 2021-01-28 04:40:28
问题 I'm using imgur API and I have several question, what is the size limit for uploading a .gif ? I read everywhere the size limit of picture is 10Mb and gif are 20Mb but when I try to upload a gif of 11Mb with the API it tells me it's too heavy. Also Im trying to upload a video (.mp4 , 6,9Mb) and I use the following request with postman https://api.imgur.com/3/image?client_id={myclientid} and in the body video={mavideo.mp4} but it return me a success with no information { "data": { "errorCode":

Upload Image To Imgur After Resizeing In PIL

百般思念 提交于 2020-01-25 23:03:21
问题 I am writing a script which will get an image from a link. Then the image will be resized using the PIL module and the uploaded to Imgur using pyimgur . I dont want to save the image on disk, instead manipulate the image in memory and then upload it from memory to Imgur. The Script: from pyimgur import Imgur import cStringIO import requests from PIL import Image LINK = "http://pngimg.com/upload/cat_PNG106.png" CLIENT_ID = '29619ae5d125ae6' im = Imgur(CLIENT_ID) def _upload_image(img, title):

POST URLRequest doesn't work in Swift 4

旧时模样 提交于 2020-01-24 01:36:06
问题 I want to use HTTP request to post an image on Imgur. I used Postman first to make sure my API logic is correct. Here is my setting for Postman ( myid is client id): This request succeeded, but the request failed in Swift with URLRequest and URLSession (Status Code: 400). var request = URLRequest(url: self.uploadURL!) request.httpMethod = "POST" request.setValue("Client-ID " + myid, forHTTPHeaderField: "Authorization") let data = "image=\(base64String)&type=base64".data(using: .utf8,