Are there any image hosting services with a public API? [closed]

﹥>﹥吖頭↗ 提交于 2019-12-04 07:45:49

问题


I've been considering image hosting services for a project but am starting to wonder if that's just too complicated for my target audience as they'd have to upload all their images to the hosting service and then "attach" the images to the CSS file using the links the hosting service provides them. While that's a fairly simple process for us developers, I'm thinking that might be a large barrier to getting user buy-in for this feature.

I could simplify by hosting and serving the images myself but I'm worried about potential scalability issues that could present which I don't have the hardware or bandwidth to handle at the present time.

My thought is that I could have users upload their images and CSS to the server in a single zip file to the web server which could then extract the files from the zip, push the images on to an image hosting service, programmatically get the corresponding URL from the service and update the CSS accordingly before attaching it to the user's display profile.

This approach could kill both birds with one stone, I wouldn't have to worry about the bandwidth issues caused by serving potentially large images on every profile request and the user doesn't have to go through the headache of needing to set up an account on an image hosting service.

Does anyone know of any image hosting services that I can programmatically integrate with that has good reliability and performance that could assist me with this conundrum?

Thanks in advance


回答1:


Review the Picasa Web Albums Data API:

  • http://support.google.com/picasa/answer/1224181?hl=en-GB
  • https://developers.google.com/picasa-web/faq#quota

If you've signed up for Google+ then photos up to 2048x2048 pixels and videos up to 15 minutes won't count towards your free storage.




回答2:


http://deviantart.com

has a public and easy to use API just HTTP POST the image to their domain and you will get a json with the url




回答3:


I used https://cloudinary.com/ and found it pretty neat!




回答4:


You might consider Amazon CloudFront. I have not used that particular service, but I have used Amazon EC2 and S3 extensively and am quite happy.

UPDATE:

I recently used CloudFront for a video hosting project and found it quite simple to setup and use.




回答5:


Check out Flickr's API:

http://www.flickr.com/services/api/




回答6:


Imgur has an API. From the "Overview":

Imgur's API exposes the entire Imgur infrastructure via a standardized programmatic interface. Using Imgur's API, you can do just about anything you can do on imgur.com, while using your programming language of choice.

The Imgur API is a RESTful API based on HTTP requests and XML or JSON(P) responses. If you're familiar with the APIs of Twitter, Amazon's S3, del.icio.us, or a host of other web services, you'll feel right at home.

This version of the API, version 3, uses OAuth 2.0. This means that all requests will need to be encrypted and sent via SSL/TLS to https://. It also means that you need to register your application, even if you aren't allowing users to login.



来源:https://stackoverflow.com/questions/1469092/are-there-any-image-hosting-services-with-a-public-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!