1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-25 06:33:48 +00:00

add api calls for office conversion

This commit is contained in:
Patrick McAndrew
2014-03-13 14:53:59 +00:00
parent 6c29b034a4
commit 1601db4f2d
2 changed files with 142 additions and 1 deletions

View File

@@ -67,3 +67,18 @@ urlpatterns = patterns('',
url(r'^repos/(?P<repo_id>[-0-9-a-f]{36})/fileops/copy/$', OpCopyView.as_view()),
url(r'^repos/(?P<repo_id>[-0-9-a-f]{36})/fileops/move/$', OpMoveView.as_view()),
)
# serve office converter static files
from seahub.utils import HAS_OFFICE_CONVERTER
if HAS_OFFICE_CONVERTER:
from seahub.utils import OFFICE_HTML_DIR
urlpatterns += patterns('',
url(r'^office-convert/static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': OFFICE_HTML_DIR}, name='api_office_convert_static'),
)
urlpatterns += patterns('',
url(r'^office-convert/status/$', OfficeConvertQueryStatus.as_view()),
url(r'^office-convert/page-num/$', OfficeConvertQueryPageNum.as_view()),
)
urlpatterns += patterns('',
url(r'^office-convert/generate/repos/(?P<repo_id>[-0-9-a-f]{36})/$', OfficeGenerateView.as_view()),
)