Imgur Registration Page

This is the registration page for Imgur Demo Service.

Try it out

This is a simple demo. Save an image to Imgur.

Registration

It is simple to set up an app to be able to handle incoming data. This Imgr bridge was written to let you save your images directly to Imgur.

<intent action="http://webintents.org/save"
  type="image/*"
  href="save.html"
  disposition="inline" />

The above tag just needs to be placed on your page, with a "href" of the page you want to be opened and now your page will be able to be launched via the Web Intent system when a user invokes the "save" intent.

How to save the image

The code for invoking the "save" intent is below.

It is a little bit more complex, but we are simply encoding the file to an

  var image = document.getElementById("imageToShare");
  var imageUrl;
  image.onchange = function(e) {
    var file = e.target.files[0];
    var fr = new FileReader();

    fr.onload = function(frE) {
      imageUrl = frE.target.result;
    };
    
    fr.readAsDataURL(file);
  };

  var save = document.getElementById("saveButton");
  save.addEventListener("click", function() {
    if(!!imageUrl == false) alert("Please select a file first");

    var intent = new Intent("http://webintents.org/save", "image/*", imageUrl);
    window.navigator.startActivity(intent, function(data) {});
  }, false);