agea / Alfresco-HTML5-Client

Pure HTML5 and Javascript Alfresco client
MIT License
25 stars 10 forks source link

Use remote Alfresco #8

Closed ebogaard closed 11 years ago

ebogaard commented 11 years ago

Would it be possible to use a remote Alfresco repository? Now it seems necessary to have Alfresco running on the same machine, as the code relies on connecting to /alfresco/cmisbrowser.

I would like to be able to connect to something like "https://share.alfresco.ext/alfresco/cmisbrowser".

agea commented 11 years ago

It should be possibile using JSON-P, something like this:

https://github.com/fmui/ApacheChemistryInAction/blob/master/appendix-d/step2/cmis.js

ebogaard commented 11 years ago

I tried changing cmisbrowser.js on rownumber 289 to: $.getJSON('https://share.alfresco.ext/alfresco/cmisbrowser', function(data) { But that didn't work.

As I'm not really at home in thuis kind on stuff, I'm wondering if I need to change some code, or that I'm just doing it wrong.

agea commented 11 years ago

I made some experiments, but it's not possible to use json-p, as some calls are made with POST requests, and json-p can be used only via GET. You should be able to use a remote Alfresco if you serve cmisbrowser.js via the remote server (you can also put it in the repository in a public area, and then get the download url)

ebogaard commented 11 years ago

That's an interesting solution. I'll try that. Thanks.