Hello Team GdPicture,
We've been trying to determine if DocuVieware is capable of displaying documents directly from cloud file storage platforms, like Google Drive, Dropbox or OneDrive, using a (generally accessible) link that would normally show it's own viewer with an option to download the file. Of course a direct download link to the original file is not easy nor in general not possible to come by.
I've tried with several examples so far and DocuVieware tends to give a blank white page in these cases.
I've searched quite a bit through forums and documents and found no trace of this use case.
Is it something that you support explicitly and if not, are there workarounds that you know of ?
Thank you in advance,
Loren
Viewing a document located in cloud storage like Google Drive, Dropbox or OneDrive
Re: Viewing a document located in cloud storage like Google Drive, Dropbox or OneDrive
Hello Loren,
You can use our LoadFromURi methods to load a file from your URi:
Javascript -> https://www.docuvieware.com/guides/aspn ... omUri.html
.NET -> https://www.docuvieware.com/guides/aspn ... omUri.html
The cloud storage solutions provide links to get your file, but there are no real "direct download" links since there are some redirections. Each cloud solution has its own workaround to get the files.
GDrive
The trick is to set this URI instead of the one provided by GDrive: https://drive.google.com/uc?export=download&id=[ID OF YOUR DOCUMENT]
OneDrive
For Onedrive it's a bit complicated. You need to generate the HTML code by clicking on the "embed" option, get the URI within the HTML code, and replace "embed" with "download". It should look like this: https://onedrive.live.com/download?cid= ... S6x7k&em=2
DropBox
The trick is to add "raw=1" at the end of the request. Example: https://www.dropbox.com/s/zuzefzybu6uy9 ... .pdf?raw=1
Best regards,
Fabio
You can use our LoadFromURi methods to load a file from your URi:
Javascript -> https://www.docuvieware.com/guides/aspn ... omUri.html
.NET -> https://www.docuvieware.com/guides/aspn ... omUri.html
The cloud storage solutions provide links to get your file, but there are no real "direct download" links since there are some redirections. Each cloud solution has its own workaround to get the files.
GDrive
The trick is to set this URI instead of the one provided by GDrive: https://drive.google.com/uc?export=download&id=[ID OF YOUR DOCUMENT]
OneDrive
For Onedrive it's a bit complicated. You need to generate the HTML code by clicking on the "embed" option, get the URI within the HTML code, and replace "embed" with "download". It should look like this: https://onedrive.live.com/download?cid= ... S6x7k&em=2
DropBox
The trick is to add "raw=1" at the end of the request. Example: https://www.dropbox.com/s/zuzefzybu6uy9 ... .pdf?raw=1
Best regards,
Fabio
Re: Viewing a document located in cloud storage like Google Drive, Dropbox or OneDrive
Amazing, thank you Fabio !
I'll give implementing these solutions a go very soon.
Have a good day
Loren
I'll give implementing these solutions a go very soon.
Have a good day
Loren
Who is online
Users browsing this forum: No registered users and 1 guest