<div>(Basically agreeing with Darin) The empty string is what I was thinking would be appropriate for this case. The file/blob spec, <a href="http://www.w3.org/TR/FileAPI/">http://www.w3.org/TR/FileAPI/</a>, already allows for an empty string if the mime type cannot be determined:</div>
<blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><span class="Apple-style-span" style="font-family: sans-serif; line-height: 21px; ">User agents SHOULD return the MIME type of the file, if it is known. If implementations cannot determine the media type of the file, they MUST return empty string.</span></div>
</blockquote><div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="line-height: 21px; font-size: medium;"><span class="Apple-style-span" style="font-size: small;">dave</span></span></font></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="line-height: 21px; font-size: medium;"><span class="Apple-style-span" style="font-size: small;"><br></span><br></span></font><div>
<div class="gmail_quote">On Fri, Jan 15, 2010 at 12:36 AM, Darin Fisher <span dir="ltr"><<a href="mailto:darin@chromium.org">darin@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="gmail_quote"><div class="im">On Thu, Jan 14, 2010 at 11:04 PM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch" target="_blank">ian@hixie.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, 14 Jan 2010, Darin Fisher wrote:<br>
> On Thu, Jan 14, 2010 at 12:10 PM, David Levin <<a href="mailto:levin@google.com" target="_blank">levin@google.com</a>> wrote:<br>
> ><br>
> > It seems like it the method should be toBlob.<br>
> ><br>
> > > This doesn't address my concern that you won't know the mime type of<br>
> > > the blob returned.<br>
> ><br>
> > This makes a good case to move the "readonly attrbiute DOMString type"<br>
> > from File to Blob.<br>
><br>
</div><div>> I like this suggestion. It seems reasonable for a Blob, which is just a<br>
> handle to data, to have an associated media type.<br>
<br>
</div>What type should a blob have if it is the result of slicing another file?<br><font color="#888888"><br></font></blockquote><div><br></div></div><div>I had the same thought after sending this ;-)</div>
<div><br></div><div>A slicing operation that changes the size of the file should probably clear the type field or set it to application/octet-stream. Perhaps Blob.type should be settable in some cases?</div><div><br></div>
<font color="#888888">
<div>-Darin</div></font></div>
</blockquote></div><br></div></div>