OData REST API for integrating MS Office - sensenet

I need to open office documents from my Sensenet client application. My client application is in ReactJs and I need to invoke the document to open in MS office. Is there any OData REST API available for doing the same. Kindly help.

You have two options:
1. open a file in a desktop MS Office application
There is an action in sensenet that gives you the url for that. First, get the actions for a document, using a request like this:
https://example.com/odata.svc/Root/Content/myworkspace/Document_Library('abcdef.docx')/Actions
You'll get the list of available actions, which is a JSON array containing action properties, for example a url. Look for the action named EditInMicrosoftOffice. If you display the URL of that action and the users clicks on that link, the browser should open the appropriate desktop office app (e.g. Word). You may notice that the format of the url is special (something like ms-word:ofe|u|https://example.com/Root/...). Please do not try to assemble this url manually, use the one that sensenet generated for you.
2. open and edit a file in the browser
This requires Office Online Server to be installed and configured in your environment, and you also need to display an html containing an iFrame that'll display the editor.
A simple host page:
https://wopi.readthedocs.io/en/latest/hostpage.html#host-page
Geting data to display the host page:
https://example.com/odata.svc/Root/Content/myworkspace/Document_Library('abcdef.docx')/GetWopiData

Related

Cumulocity File Repository

I am trying to load a csv file in the Cumulocity -> Administration - > Management - > File Repository. My objective is to access the file contents in the HTML widget and show the data in tabular or chart format.
I tried using the fetch() method to use csv file url , but it was not able to fetch the file. The file I believe has been locally stored into the Cumulocity platform now. How can I access the file via fetch().
You are trying to abuse the HTML widget for something it wasn't designed for.
Instead of hacking such logic into the HTML widget you should just extend the Cockpit application with your own widget which is honestly not much more difficult using the WebSDK. https://cumulocity.com/guides/web/introduction/
There is a XSRF protection to prevent exactly what you are currently trying: Bringing in custom javascript code into the live application and trying to access the platform API by "hijacking" the cookies of the logged in user (and you would either need the cookies or hardcode some credentials as you cannot access the API unauthenticated).
If you use the SDK there is even a proper Angular service in order to fetch the file for the API.

How to access BigCommerce internalapi?

I am trying to download (backup) images that customers upload for products that take custom logos (these are typically JPG, PNG, PDF, etc.) These customer files are downloadable by clicking on a hyperlink in the BigCommerce admin page for the order in question. The link is not a link to the image path but instead, a link to a service that sends the file to the browser. In other words, you have to be authenticated into the admin site to download the file. The URL looks like this:
https://mystore.com/internalapi/v1/orders/383945/products/251438/attributes/561518/download
https://mystore.com/internalapi/v1/orders/{order id}/products/{lineItem id}/attributes/{option id}/download
These are easily constructed in the API itself for a given order. If I use the link in a browser tab while I'm logged into the admin site, the file downloads.
But what I am trying to write an app to automatically download all the files (there are thousands). When I try to use this URL in an app, I get a authentication error. I tried at first using my regular API credentials but then used the credentials to log into the admin site. Both give me an authentication error.
I could not find anything documented on this so-called "internalapi." Anyone ever try to use this "internal" API that is used by the admin site?
I believe authentication is cookie based for that internal API, but there could be problems with using our non-publicly documented internal APIs in production, i.e. we may make future updates that would be breaking changes.
Images attached to orders through a file upload option also get copied to WebDAV, in the dav/product_images/configured_products folder. Another way to do this could be to use a WebDAV client library like easywebdav to connect and download the files.

People picker not working in classic mode web application in SharePoint 2013

I have a SharePoint 2010 web application migrated to SharePoint 2013. this is a classic mode web application, we are not using claims, my client doesn't wants it ( Don't ask why?).
I had other web application migrated as same process but i can add users in them.
but in this i am not able to.
I can add users and find users in the web application in central administration. But not in the web application itself.
I am not sure what changes i have to make so that it starts picking or finding users from the people picker. any ideas.
it was because of the asp.netvalidation=2.0 not present in the httprequest line in webconfig. there was no validation for the input provided in any input box.
once we added the asp.net validation it worked fine.
It is a browser compatible issue as well whereas in new browser like IE 10 and other latest browsers it doesn't play well.
we updated the
In short the fix is to edit the pickerdialog.master file in notepad and add a meta data tag, , to the header section.
well keep in mind always save a local copy of your original master page.
it is recommended not to update any original files, we can run the site in compatible mode too.

Document Uploading

I am working on Document upload feature present in MS CRM 2011. However while uploading a document we have to provide share point URL.
Could you please help me out how to get share point URL?
I don't have no idea about share point
Microsoft Dynamics CRM and Sharepoint are different products. You need to have installed Sharepoint in order to use it. The URL required to configure CRM will be the address of the document library where you wish CRM to start storing your documents.
In any case, I think that this question best belongs on Super User so I have flagged it to be moved.
When you install SharePoint and create your first web application you can choose what the majority of the URL looks like. it will also be the URL you use to navigate to the site.

Can I view Report developed in Access 2007 in Asp.net web page?

I developer a report in Access 2007 and i want to know if there is any way that allow me to view this report in Asp.net web page ?
Not an ASP.Net page but one possible option would be to export the report as a snapshot (*.snp) file. Then you can embed the file into a HTML web page.
You would have to re-export the report each time to update it though. Also the user would have to install the snapshot viewer on their PC Download Link
I think it still works with Access 2007 see MS kb article
The HTML code would be something like:
For more information see Automate publishing a report snapshot to the Web
You should be able to connect to Access just like any other DB, and display the data using a ASP.Net DataGrid.