Discussion:
How to open Blob in Chrome on iOS
Tomáš Masník
2014-07-01 06:31:03 UTC
Permalink
I want to open Blob object from javascript and the only thing I can see is
a blank page.

*Description:*
I want to open Blob object from javascript and the only thing I can see is
a blank page. Code:

var blob = new window.Blob(['Hello, world!'], {type:
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.location.href = url;

This does nothing. If i change it to:

var blob = new window.Blob(['Hello, world!'], {type:
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.open(url);

it opens a new tab with correct URL (blob:http%3A//10.128.52.86
%3A8080/8d84447a-bdf1-4ee4-9b55-72f8159a687c) but with no content.

This features are working on any other platform/browser (except for IE of
course...).

*Expected behavior:*
I would expect the browser to show plaintext file with text "Hello, world!".

*Version: *35.0.1916.41 Chrome on iOS 7.1.1

Is there any known workaround? Thank you

Tomas
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe-F7+***@public.gmane.org
To post to this group, send email to chromium-html5-F7+***@public.gmane.org
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
PhistucK
2014-07-01 06:37:53 UTC
Permalink
Chrome for iOS is not really Chrome (in terms of the rendering engine and
JavaScript engine), it is a Chrome skinned Mobile Safari (with a lower
JavaScript performance due to platform limitations up to and not including
iOS 8).
So if it works in Mobile Safari, it should work in Chrome for iOS. Have you
tried Mobile Safari?


☆*PhistucK*
Post by Tomáš Masník
I want to open Blob object from javascript and the only thing I can see is
a blank page.
*Description:*
I want to open Blob object from javascript and the only thing I can see is
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.location.href = url;
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.open(url);
it opens a new tab with correct URL (blob:http%3A//10.128.52.86%
3A8080/8d84447a-bdf1-4ee4-9b55-72f8159a687c) but with no content.
This features are working on any other platform/browser (except for IE of
course...).
*Expected behavior:*
I would expect the browser to show plaintext file with text "Hello, world!".
*Version: *35.0.1916.41 Chrome on iOS 7.1.1
Is there any known workaround? Thank you
Tomas
--
You received this message because you are subscribed to the Google Groups
"Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at
http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe-F7+***@public.gmane.org
To post to this group, send email to chromium-html5-F7+***@public.gmane.org
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Tomáš Masník
2014-07-01 06:54:29 UTC
Permalink
Yes, Mobile Safari works (if that's the browser that is installed by
default on iPad).
Post by PhistucK
Chrome for iOS is not really Chrome (in terms of the rendering engine and
JavaScript engine), it is a Chrome skinned Mobile Safari (with a lower
JavaScript performance due to platform limitations up to and not including
iOS 8).
So if it works in Mobile Safari, it should work in Chrome for iOS. Have
you tried Mobile Safari?
☆*PhistucK*
Post by Tomáš Masník
I want to open Blob object from javascript and the only thing I can see
is a blank page.
*Description:*
I want to open Blob object from javascript and the only thing I can see
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.location.href = url;
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.open(url);
it opens a new tab with correct URL (blob:http%3A//10.128.52.86%
3A8080/8d84447a-bdf1-4ee4-9b55-72f8159a687c) but with no content.
This features are working on any other platform/browser (except for IE of
course...).
*Expected behavior:*
I would expect the browser to show plaintext file with text "Hello, world!".
*Version: *35.0.1916.41 Chrome on iOS 7.1.1
Is there any known workaround? Thank you
Tomas
--
You received this message because you are subscribed to the Google Groups
"Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at
http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout
.
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+unsubscribe-F7+***@public.gmane.org
To post to this group, send email to chromium-html5-F7+***@public.gmane.org
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
alit56
2014-12-17 14:02:44 UTC
Permalink
Hi Tomas-

I am encountering the same issue using a blob generated by filesaver.js.
Were you able to get the blob to load in a new page? Any insight would
help.

Best,
Alek
Post by Tomáš Masník
I want to open Blob object from javascript and the only thing I can see is
a blank page.
*Description:*
I want to open Blob object from javascript and the only thing I can see is
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.location.href = url;
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.open(url);
it opens a new tab with correct URL (blob:http%3A//10.128.52.86
%3A8080/8d84447a-bdf1-4ee4-9b55-72f8159a687c) but with no content.
This features are working on any other platform/browser (except for IE of
course...).
*Expected behavior:*
I would expect the browser to show plaintext file with text "Hello, world!".
*Version: *35.0.1916.41 Chrome on iOS 7.1.1
Is there any known workaround? Thank you
Tomas
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+***@chromium.org.
To post to this group, send email to chromium-***@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Tomáš Masník
2014-12-17 14:06:01 UTC
Permalink
Hi,

I've solved it only by a workaround. See my stackoverflow question (and
answer) here
<http://stackoverflow.com/questions/24485077/how-to-open-blob-url-on-chrome-ios>
.

I hope it helps you. Good luck :)

Tomas
Post by alit56
Hi Tomas-
I am encountering the same issue using a blob generated by filesaver.js.
Were you able to get the blob to load in a new page? Any insight would
help.
Best,
Alek
Post by Tomáš Masník
I want to open Blob object from javascript and the only thing I can see
is a blank page.
*Description:*
I want to open Blob object from javascript and the only thing I can see
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.location.href = url;
'text/plain;charset=utf-8'});
window.URL = window.URL || window.webkitURL;
var url = window.URL.createObjectURL(blob);
window.open(url);
it opens a new tab with correct URL (blob:http%3A//10.128.52.86
%3A8080/8d84447a-bdf1-4ee4-9b55-72f8159a687c) but with no content.
This features are working on any other platform/browser (except for IE of
course...).
*Expected behavior:*
I would expect the browser to show plaintext file with text "Hello, world!".
*Version: *35.0.1916.41 Chrome on iOS 7.1.1
Is there any known workaround? Thank you
Tomas
--
You received this message because you are subscribed to the Google Groups "Chromium HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-html5+***@chromium.org.
To post to this group, send email to chromium-***@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-html5/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.
Loading...