views:

45

answers:

1

I want to use imgur's API to upload images however I don't want to use my server too much in the act because I'd like to keep bandwidth to a minimum.

The API accepts images in a base64 encoded string or binary.

Also if there's a way to encode images into base64 or binary in javascript that would be really useful to know too

+1  A: 

JavaScript security restrictions prevent you from reading a local file and doing anything with it. That will be the reason that you cannot encode a file in Base64 and send it directly to that API.

Does Imgur have an API which accepts a direct file upload?

gahooa
Ok. PHP was the other option.
Ben Shelock
Javascript also disallows POSTing to another domain.
Nicolás