jpvanhal / siilo

File storage abstraction layer for Python
http://siilo.readthedocs.org/
MIT License
23 stars 11 forks source link

Add CMIS storage support. #4

Open fmerges opened 10 years ago

fmerges commented 10 years ago

The following changes add support for CMIS.

There is a particular case which doesn't work with the current version of cmislib 0.5.1 unless patched, see: https://issues.apache.org/jira/browse/CMIS-799

The case consists of writing to a file with subfolders that doesn't exists in the remote repository. Example:

filename = '/folder/subfolder/some_text.txt'    # new file doesn't exist yet remotely
with storage.open(filename, 'w') as f:
    f.write(u'Hello World!\n')

In order to make it work you just have to apply the following diff to cmislib.model.py:

2912c2912
< return ResultSet(self._cmisClient, self, result)
—
> return ResultSet(self._cmisClient, self._repository, result)
jpvanhal commented 10 years ago

Thanks! I'll try to review this over the weekend.

mehcode commented 10 years ago

For whats it worth we have a python 3.x only version of cmislib here: https://github.com/concordusapps/python-cmislib

We migrated it in a hurry a good while back.

fmerges commented 10 years ago

Your link is a fork of jpots unreleased version https://github.com/apache/chemistry-cmislib right?

A made this taking the released one which is 0.5.1

I wonder what happen with it because I don't see much activity on the official page, I filed a bug report but nothing happened so far... to me it's curious because there are quite some companies that rely on Alfresco and others...

Fiveside commented 10 years ago

The python3 fork was made 6 months ago with whatever was on the subversion trunk at the time (the converter left some weird branches in the git version that I haven't bothered to clean up yet). As far as I can tell, no new changes have been pushed to cmislib in the time since then.