This site must be viewed with Javascript enabled. If you are unable to turn on Javascript, please follow these instructions.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×1
×1

Asked: Jul 26 '11 at 21:05

Seen: 1,946 times

Last updated: Nov 14 '13 at 19:16

Image-hosting is, quite frankly, a pain. I have quite a few pictures of my own that I would like to share...Could this be changed or not?

Blessings, Jai

asked Jul 26 '11 at 21:05

Jaianniah's gravatar image

Jaianniah
426293027


Yes later versions of the StackExchange software support direct upload of images without the need for an external service, I believe they have a contract with an image hoster though. I don't know how OSQA handles that as they're less business-oriented, and someone has to pay for the bandwidth after all. Either way, it'll be only slightly easier to use, because still in 2011 you can't move images into text on pages on the web as easily as in MS Word. ;-) That's because of the way how web technology works. But maybe the OSQA guys will come up with a nifty solution.

In the meantime, from the image hosters, I find http://imgur.com/ rather convenient to use. Very slick and user-friendly.

Another way to easily link images would be by using DropBox. They offer free storage space in the web. Storing images is just one of many things it can do. It's brilliant and very easy to use. After signing up and downloading the software, you'll have special folders on your computer. Then you can just move or copy your images into the "Public" folder. This will make them available on the web instantly. Then it'll be just a mouse click to get the address of an image to copy and paste it into web pages like this. DropBox offer 2 GB for free, signing up with my referrer link [ http://db.tt/D4SCQf5 ] will both get us an extra 250 MB. :)

link

answered Jul 29 '11 at 19:11

herzmeister's gravatar image

herzmeister
362

edited Jul 29 '11 at 19:12

Thanks, herz, for a great answer- I am sorry it took me so long to comment on it. I will try all you suggest! Blessings,>>>>>>>>>>>>

(Nov 14 '11 at 10:15) Jaianniah

This feature already exists in the new software but it appears not to be working properly and is being looked at by some of the developers.

link

answered Jul 29 '11 at 03:19

Simon%20Templeton's gravatar image

Simon Templeton ♦♦
2.2k172242

i agree with jai on this one. image hosting is a pain why can we put image directely from the pc? it would be more easy and less complicated.

update: yes there is away: msConvertURL you need internet explorer 11 and the web site must support this. you can copie paste directly from clip board or word or photo program on the web page . try it on this link if your browser support it you can copie paste a picture on it.

http://ie.microsoft.com/testdrive/browser/Editing_Paste_Image/

that is dataurl that is used with interent explorer 11 to paste directely on screen:

Red dot

you can learn more on this link: http://en.wikipedia.org/wiki/Data_URI_scheme

I add take a photo of the screen to show you but it seams it is to big to transfer.

I have tried to copie the blob object to the page it does not show so I have remove it.

here is some info about the blob method. that is a simple line of codes with out url.

here is the image in blob code:

you probably do not see it but it is there.

The Blob object represents immutable raw binary data, and allows access to ranges of bytes within the blob object as a separate blob object.

Syntax

JavaScript

Copy

var file = document.getElementById('fileInput').files[0]; // Get the user selected file from the <input type="file" id="fileInput"/> element. var firstHalf = file.slice(0, Math.round(file.size/2)); // Obtain the first half of the file.

Members

The Blob object has these types of members: •Methods •Properties

Methods

The Blob object has these methods.

Method

Description

msClose
Closes the Blob object by releasing the stream held by the Blob and the associated file or memory resource.

msDetachStream
Detaches the IInputStream object from the Blob in order to use the backing IInputStream object in other WinRT APIs.

slice
Returns a new Blob object with bytes ranging from its optional start parameter up to but not including its optional end parameter.

Properties

The Blob object has these properties.

Property

Description

size

The size of the Blob object in bytes.

type

Returns the content type of the object.

Remarks

The Blob object represents immutable raw data. It provides a method to slice data objects between ranges of bytes into further chunks of raw data. It also provides an attribute representing the size of the chunk of data. The File object inherits from the blob object.

Blob objects can be read asynchronously only on the main thread via FileReader objects or through the URL.createObjectURL method for access to data through Image or video tags.

Metadata access via attributes such as size and type return synchronously. This trade-off is based on the assumption that metadata access doesn't significantly block or disrupt the browser's main thread, while reading blob data does.

With respect to Windows Store apps using JavaScript, the Blob (binary large object) is a Document Object Model (DOM) type that acts as a wrapper for sized, random-access binary data that you are using for a JavaScript application. This lets you provide access for multimedia files, such as those that use image, video, or audio formats, from your application. You use the readAsBlob method on the msStreamReader object to convert a stream of unsized, sequential binary data (represented by an msStream object) into a Blob object.

The Blob object also allows interoperation with a C++ IRandomAccessStream object through the msRandomAccessStream property. This lets you save the data from a Blob to a file in the file system or to an IndexedDB.

A Blob is consumed or created in the following areas: •XmlHttpRequest (XHR) •Canvas •IndexedDB •PostMessage

The blob object has a slice method that you use to access a range of bytes within the blob object. The slice becomes a separate blob object.

You create the Uniform Resource Identifier (URI) for the blob object using the window.URL.createObjectURL method. To revoke the URI, you use the window.URL.revokeObjectURL method.

Examples

Because the File object inherits from the Blob object, the following code sample is based on the File object.

JavaScript

Copy

<html>

<head> <title>Reading a Binary Large Object (blob)</title> <script type="text/javascript">

// ---------------------------------------------------------------------------------------------------------

var globals = 
    {
      selectedFile: null,
      fileSize: 0 
    };

// ---------------------------------------------------------------------------------------------------------

window.addEventListener('load', init, false);

// ---------------------------------------------------------------------------------------------------------

function fileApiSupportCheck() {
  if (window.File && window.FileReader && window.FileList && window.Blob) {
    // All the File APIs are supported.
  }
  else {
    document.getElementById('alert').innerHTML = '<h2>FILE APIs NOT FULLY SUPPORTED - UPDATE YOUR BROWSER</h2>';
  }
}

// ---------------------------------------------------------------------------------------------------------

function init() {
  fileApiSupportCheck();
  document.getElementById('fileInput').addEventListener('change', fileInputHandler, false);
  document.getElementById('byteRangeButton').addEventListener('click', byteRangeButtonHandler, false);
}

// ---------------------------------------------------------------------------------------------------------

function fileInputHandler(evt) {
  var f = evt.target.files[0]; // The solo file selected by the user.

  if (!f.size) {
    document.getElementById('alert').innerHTML = 'Please select a file (that contains some content).';
    return;
  }

  globals.selectedFile = f;
  globals.fileSize = f.size;

  document.getElementById('byteCount').innerHTML = '<li><strong>' + f.name + '</strong> (' + (f.type || 'n/a') + ') = <strong>' + f.size + ' bytes</strong></li>';
  document.getElementById('hidder').style.visibility = "visible"; // We've selected a valid file and can now safely show the byte range input markup.
}

// ---------------------------------------------------------------------------------------------------------

function byteRangeButtonHandler() {
  var start = Number(document.getElementById('byteStart').value);
  var end = Number(document.getElementById('byteEnd').value);

  if (start < 0 || start >= globals.fileSize) {
    start = 0;      
    document.getElementById('alert').innerHTML = 'Bad starting byte value, using ' + start + ' instead.';
  }

  if (end <= start || end > globals.fileSize) {
    end = globals.fileSize;
    document.getElementById('alert').innerHTML = 'Bad ending byte value, using ' + end + ' instead.';
  }

  readBlob(start, end);
}

// ---------------------------------------------------------------------------------------------------------

function readBlob(startByte, endByte) {
  var file = globals.selectedFile;
  var blob = file.slice(startByte, endByte); // Grab a blob of file data starting from startByte up to but not including endByte.

  var reader = new FileReader();
  reader.onloadend = onloadendHandler;
  reader.onerror = errorHandler;
  reader.readAsText(blob); // Read the file asynchronously and use callbacks to handle necessary actions.
}

// ---------------------------------------------------------------------------------------------------------

function onloadendHandler(evt) {
  if (evt.target.readyState == FileReader.DONE) {
    document.getElementById('fileOutputHeader').textContent = "File bytes in text format:";
    document.getElementById('byteRangeFileContent').textContent = evt.target.result;
  }
}

// ---------------------------------------------------------------------------------------------------------

function errorHandler(evt) {
  if (evt.target.error.name == "NotReadableError") {
    document.getElementById('alert').innerHTML = 'The file could not be read.';
  }
  else {
    document.getElementById('alert').innerHTML = 'File error.';
  }      
}

</script> </head>

<body>

Reading a Binary Large Object (blob)

Displays file data between a starting byte value and ending byte value.

Select a file:

<input type="file" id="fileInput"/>


    Enter byte range:

    <input type="number" id="byteStart"/> Start byte (counting from the 0th byte).

    <input type="number" id="byteEnd"/> End byte (counting from the 0th byte).

    <button id="byteRangeButton">Show File Content for Byte Range</button>

    </body>

    </html>
    link

    answered Nov 04 '11 at 20:58

    whitetiger's gravatar image

    whitetiger
    2956815

    edited Nov 14 '13 at 19:16

    Your answer
    toggle preview

    Related Questions