This post is more than 5 years old
16 Posts
0
3690
Shareable URL not opening in Chrome
Hi,
When I try to open a file from Atmos using Shareable URL in Google Chrome, it is not opening. However it opens well with IE 8 and Mozilla.
Please help.
Thanks and regards,
Ratish.
JasonCwik
281 Posts
0
December 6th, 2011 08:00
It looks like UploadHelper in C# doesn't allow for setting the mimetype. You can skip UploadHelper and do it like this:
Also note that the ACL you're creating is the default; you could just use 'null' in the ACL argument if that's the ACL you want.
I'll also open a ticket to allow setting the mimetype in the C# UploadHelper.
JasonCwik
281 Posts
0
December 6th, 2011 07:00
I see the same issue. I suspect it's actually a bug in Chrome since the download doesn't even seem to start. However, I did notice that there wasn't a mimetype specified for the object in Atmos (it was defaulted to "application/octet-stream"). I would recommend setting the mime type to "application/pdf" when you create or update the object in Atmos. This mimetype will then be returned when you request it via shareable URL.
ratish777
16 Posts
0
December 6th, 2011 07:00
It neither downloads nor promts the user to download.
rbala1
222 Posts
0
December 6th, 2011 07:00
Are you saying that it doesn't download when using Chrome or that it doesn't automatically prompt the user to open the downloaded object?
rbala1
222 Posts
0
December 6th, 2011 07:00
Can you post an example? I'm not able to recreate this.
ratish777
16 Posts
0
December 6th, 2011 07:00
I have generated the below sharable URL from AtmosFox Organizer :
https://cloudonestorage.peer1.com/rest/namespace/Company1/18399/18399_54_4454__4b0ab729a2230dac04ce3ff6f6783004eccfe896c3f9.pdf?uid=2cb3b7d371d647c4a469db60a13e3add%2F6131312&expires=1323192695&signature=SPh6Q1G9CWacFDscRo5iAyuX%2FkQ%3D
If you try to open the above url in Google chrome it won't open, however it will open in IE and Mozilla.
DarrenSoothill
15 Posts
0
December 6th, 2011 07:00
So I have tried Safari and Firefox on the Mac and they both work fine but Chrome doesn't which to me says there is an issue with Chrome.
Darren
From: ratish777 >
Reply-To: "jive-116553561-oqk-2-cf9o@emc-developer.hosted.jivesoftware.com " >
Date: Tue, 6 Dec 2011 10:34:47 -0500
To: Darren Soothill >
Subject: New message: "Shareable URL not opening in Chrome"
EMC Community Network
Re: Shareable URL not opening in Chrome
created by ratish777 in Atmos - View the full discussion
chris_arnett
110 Posts
1
December 6th, 2011 07:00
Chrome's internal PDF renderer doesn't like the file (maybe due to the lack of a mime type). You can disable that plug-in though and verify that the file downloads (and then use Acrobat to view it). In Chrome, navigate to "chrome://plugins" and click on "disable" below the Chrome PDF Viewer. Then try the link again.
ratish777
16 Posts
0
December 6th, 2011 08:00
Thanks Jason,
The above code worked, now I am able to open the documents in Chrome as well.
Regards,
Ratish
ratish777
16 Posts
0
December 6th, 2011 08:00
Thanks Jason,
Can you please tell me how to add mime type while uploading a document. I use the following code to upload:
EsuRestApi cloudRest = new EsuRestApi("cloudonestorage.peer1.com", 443, uid, sharedSecret);
Acl acl = new Acl();
acl.AddGrant(new Grant(new Grantee(cloudRest.GetUid(), Grantee.GRANTEE_TYPE.USER), Permission.FULL_CONTROL));
EsuApi cloud = cloudRest;
UploadHelper upload = new UploadHelper(cloud);
ObjectId oId = upload.CreateObjectOnPath(new ObjectPath(tofile), fromfile, acl, null);
Please help.
Regards,
Ratish