Content stream to CMIS's file without API - post

I have a fileshare server (from apache opencmis project) that I want to access directly by a web page. So by using javascript probably. My question is :
-Is it possible to work on a cmis repository using http request (like here for alfresco server)?
I find that there is very few information on the subject.
Thanks
edit : Maybe my need isn't clear after reading me again. So to simplify I'm looking for a litle static html/javascript code. My purpose is to upload a new file to folder (I know his ObjectId) or modify content of a file.
Ps : Only LGPL, Apache or similar licence.
Thanks again!

There is a rudimentary example here:
https://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings-war/src/main/webapp/web/index.html?view=markup

Related

Why does my asciidoc relative link doesn't work outside of my microservice?

I'm starting to create documentation using asciidoc on my project which is following a microservices architecture.
We have a microservice for documentation. In its files I want to link to another document in another microservice.
I can do a relative link inside my own component but when I try to go higher with ../ it does not work and the link does nothing.
Does anyone may know why ?
Could it be because asciidoc is installed in the jenkins file of my component but not the others ?
Or is it because I do not use the link correctly ?
I use it as it is describe in the doc :
link:../other_microservice/other-document.asciidoc[]
I also tried the xref with no more success.
Thanks a lot for anyone who can help me
The link: macro is supposed to be used with a URL, not a file path. Generally, it does what you mean. However, Asciidoctor's safe mode prevents access to files which reside outside of the folder containing the source file specified for transformation.
So, if the documentation for your other microservices is going to be hosted separately (e.g. one URL per microservice), then you should update your link: macro usage to specify URLs instead.
If all of your microservice documentation is to be hosted under one URL, specify --safe when you invoke Asciidoctor. For more details, see:: https://asciidoctor.org/docs/user-manual/#running-asciidoctor-securely

What is the best practice to publish online the /doc folder

I am using Rails (4.1.5) and I have generated a full documentation which has been put in /doc as by default. My app is publish online but internally. I would like to expose this documentation through an URL part of my actual (e.g. http://myapp.com/doc). I want to find a way to automate this as the "generate the doc" action will be done on my side to refresh the documentation.
Somebody have any idea what should be the trick for this? Route (if so, how), should I create a controller for that specifically?
Thank you in advance for any help on this.
I've done this using Dropbox. I run my documentation generator command and have it output to a location in my Dropbox folder. Then, my colleagues can simply open the index.html file at the shared location to view the documentation. But, in your case I suppose you could have your myapp.com/doc url redirect to the dropbox location? The advantage of all this being that you don't have to redeploy to have updated documentation -- just regenerate the docs since Dropbox does the uploading and hosting for you.

how can i know the physical path from selected file (fileupload bootstrap)

I´m making a web application in MVC, I have a view where I select a file from my pc directory (like opendialog form in windows applications), bootstrap´s fileupload gets the file name but I want to know his physical path to. Because I want to save it in my data base (where file come from).
Anybody can help me??
Thank you in advance!
You can't, this information is never sent to the server for obvious security reasons. Only the filename is sent to the server. So you cannot store the physical path where the file originated from the client machine on your server.
When you upload a file via a web browser, the actual file path is not supplied. This is seen as being a security feature.
There is no way to circumvent this using pure HTML. Some people get around it by using a plugin such as Flash or Silverlight to upload the file, but I recommend living with this feature if you can.

Alfresco CMIS, Bad filenames for download of files

I have a website that have an integration against an Alfresco installation through CMIS. The problem is that the content-url that I get from Alfresco is ugly. The major problem is that the filename is "content.xxx" (xxx-being the file-extension).
In another project we have solved this by streaming the document through the website and then to the visitor, but for this case (internal web) that doesn't make any sence and only introduce another source for problems. But I can't make the user to accept content.xxx as filename for all files they are going to use so I need a way to fix this.
Is streaming the file through the website my best choise after all?
It appears that you may be using the deprecated CMIS URLs. When I get the content stream for an object named "test.txt" using the appropriate CMIS URLs and the AtomPub binding (/alfresco/cmisatom) I use the following URL:
/alfresco/cmisatom/1b8980cc-1f1b-4ac3-b26f-17aeee0cefc9/content/test.txt?id=workspace%3A%2F%2FSpacesStore%2Fc20d54f9-01b6-4c80-861b-094c2246ab21%3B1.0
If I then connect using the deprecated URL (/alfresco/s/api/cmis) the content stream URL becomes:
/alfresco/s/cmis/s/workspace:SpacesStore/i/c20d54f9-01b6-4c80-861b-094c2246ab21/content.txt
Can you double-check that you are using the non-deprecated URL and see if this addresses your issue?

Show files on FTP in a Rails App

We have an FTP site for clients, and they just go to it with a web browser and see the files. I'd like to display the files in a more visually pleasing manner, is there a way I can show what files are on the server in the view, perhaps iterate over them and style them?
I found this answer here, but really didn't answer my question:
Ruby-Rails serve ftp file direct to client
(using rails 3 if it makes a difference)
You can use library links below:
http://www.ruby-doc.org/stdlib-1.9.3/libdoc/net/ftp/rdoc/index.html
http://oreilly.com/catalog/ruby/chapter/ch04.html
and you can use EventMachine https://github.com/schleyfox/em-ftp-client.
Cheers!

Resources