Hi All,
I'm looking for the solution to view the documents directly from the reactive application without downloading from the server.
I have created the application where I am using upload control to upload files on Sharepoint server. Now I want to view those documents from the application without redirecting on the sharepoint site.
Hi,
Please try this forge component
https://www.outsystems.com/forge/component-overview/10147/html-document-viewer-o11
Hi @Manikandan Sambasivam ,
Thank you for quick reply.
As I read the description of the link which you shared, there they mentioned only few file formats. I want to see documents which includes '.xlsx, .doc etc' as well.
Have you tried this solution before to see all files.
we didn't try for.xlsx and .doc files, but I will check and let you know
I implemented this on traditional. I attached the .oap file hope this will help you.
I attached the demo URL:https://personal-ukpekwls.outsystemscloud.com/ForgeComponent/UploadScreen.aspx
Regards,
@Deepika Patel ,
Thanks for your reply.
I tried your solution and found that it is using Microsoft Office apps to view the documents.
https://view.officeapps.live.com/.
Since these files gets stored on the server and accessible publicly by the URL anytime without authentication , this solution will not work for me.
Hello @Vaibhav Pandey ,
In order to display Sharepoint documents in your app, you will need to integrate Sharepoint in your app in order to retrieve the documents, you can check these links for that: Sharepoint API Docs , Forge Assets , Outsystems Docs .
Once you retrieve the URL, use an iframe (Demo) in OutSystems. An example for that would be:
<iframe src="https://view.officeapps.live.com/op/embed.aspx?src=[SHAREPOINT_URL]" width="100%" height="800px"></iframe>
Hi @Mihai Melencu ,
I have concern on using
"https://view.officeapps.live.com
I want to view document which are stored on SharePoint site with permission restriction.
My application can access documents using Oauth Token and download it
but individual can not directly access the document through link.
If accessing file through code and sharing file binary code to "https://view.officeapps.live.com" , Is it safe for private documents.
Does Microsoft doesn't store the document at their end before displaying in browser.
if your document is on the sharepoint then you can use it in iframe.
you can find lots of document on google to get embedded sharepont document url
https://www.mrsharepoint.guru/how-to-use-iframe-in-sharepoint-online/
Hi @Vaibhav Pandey ,
Please check the below discussion.
https://www.outsystems.com/forums/discussion/75875/extract-data-from-pdf/
Thanks,
Lavanya Kamalaguru.
Hello Vaibhav,
Try OfficeToHtml it render whole document in the HTML screen
Hi @Gourav Shrivastava ,
thanks for your solution , but this doesn't support to .ppt and .doc files.
Hello vaibhav, Are you tried this Component Reactive_web_previer, if not please take a look
This is the Demo link for this Component
Hi @Venkatesaiya ,Thank for your solution, but when try to view .txt file , it doesn't show anything.
I have attached the screen shot for the same.
Hi Vaibhav,
Each document type has its own internal structure, and its own rules on how to display them. Furthermore, many document types need calculations, and once shown you probably also want some interaction (e.g. when a document has multiple pages and you want to scroll or allow viewing a specific page). Therefore, document viewing is a very complex topic, and you cannot expect a simple solution that just displays everything.
Secondly, if your documents are stored on the Sharepoint server, they're on that server, so I'm not sure what you mean when you say "not downloading from the server" - you cannot show a document client-side without first retrieving (i.e. downloading) it.
Hi @Kilian Hekhuis ,
I am uploading document on Sharepoint site and then Storing the returned Sharepoint File ID and File name in local database.
Now on UI I'm displaying the filename from the local data base and using Link control.
So when user clicks on file name , by using sharepoint file Id which is already stored on my local database I download the file from the sharepoint server.
Here I have requirement , when clicking on file name I don't want to download the file from the server instead I need viewer where file can be shown and also I can't redirect user on sharepoint site to view the document directly instead of downloading , because all user of my application can not have access on sharepoint site.
When you say "downloading", you mean that the user is downloading the file to their local hard disk? Because one way or another, if you want the file to be displayed in the user's browser, it must be transported from the server to the client, which is also a kind of "downloading". You need to transfer the binary data from the server to the client, and then use some kind of Forge Asset or other viewer to display that binary data in the right format.
@Kilian Hekhuis ,
Yeah I am looking for that component which can display binary data in the right format.
I tried many solutions, most of them are using Office apps
"https://view.officeapps.live.com/op/embed.aspx?src"
But for private documents , this solution doesn't work also It doesn't work for ".txt" files
For txt files you may need to handle them yourself. E.g. show them in a text box or use an Expression (though be wary of HTML / Javascript intjection!).