Content
View differences
Updated by Marc Alcobé almost 4 years ago
### Use cases:
* Make uploading and linking files from an empty status (FEATURE <mention class="mention" data-id="43576" data-type="work_package" data-text="#43576">#43576</mention>).
* Create a link between a work package and an existing file in Nextcloud (FEATURE <mention class="mention" data-id="43657" data-type="work_package" data-text="#43657">#43657</mention>).
* Chose a file from Nextcloud via a _file picker (FEATURE <mention class="mention" data-id="43654" data-type="work_package" data-text="#43654">#43654</mention>)_
* Create a _file link_ between the work package and the file #TBC).
* Upload a file from within a work package in OpenProject (FEATURE <mention class="mention" data-id="43656" data-type="work_package" data-text="#43656">#43656</mention>). #TBC).
* Chose a location in Nextcloud via a _location picker (FEATURE_ <mention class="mention" data-id="43655" data-type="work_package" data-text="#43655">#43655</mention>_)_ picker_
* Save the file in Nextcloud
* Create a _file link_ between the work package and the file
* Delete _file links_ from a work package without (without deleting the files it in Nextcloud (related to feature #TDC). Nextcloud).
* Allow users to drag and drop files in both attachments and Nextcloud (FEATURE <mention class="mention" data-id="43577" data-type="work_package" data-text="#43577">#43577</mention>).
* Make the previous use cases available through work package copy and creation (FEATURE <mention class="mention" data-id="43578" data-type="work_package" data-text="#43578">#43578</mention> and <mention class="mention" data-id="41524" data-type="work_package" data-text="#41524">#41524</mention>).
### Generic visuals
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36987/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36988/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36989/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/37083/content"> src="/api/v3/attachments/36989/content">
###
### Implementation chunks:
* File picker for selecting link targets (files and directories). Queries Nextcloud with the user's access token (probably via WebDAV). Tunneled through OpenProject backend.
* Location picker for upload targets (a target is always a directory). Queries Nextcloud with the user's access token (probably via WebDAV). Tunneled through OpenProject backend.
* If possible, direct upload of files to Nextcloud without tunneling through OpenProject server. This requires some sort of one-time upload tokens, which can get exposed to the OpenProject frontend. Fallback could be tunneling all uploaded files through OpenProject.
* Remove file links from OpenProject when files get deleted in Nextcloud (either some sort of callback triggered by Nextcloud or through polling when user opens the _Files_ tab).
### Implementation decisions:
* The file name we present in OpenProject is the name of the file that the file's owner sees. Apparently in Nextcloud a file can have multiple names and paths every time a file gets shared. To have a "canonical" name for all OpenProject users we will always show the file name that the file's owner sees.
* OpenProject updates the "cached" file name in OpenProject when a user open the _Files_ tab.
### Out of scope:
* Syncing of access rights to the files in Nextcloud according to the roles and privileges of members in a OpenProject project. That will get partly tackled later with shared project folders (<mention class="mention" data-id="41400" data-type="work_package" data-text="#41400">#41400</mention>)
* Linking between a OpenProject project (instead of work packages) and files in Nextcloud. That is feasible and intended to built in a later stage. The outlook could be a possible replacement for the current "Documents" module.
* Make uploading and linking files from an empty status (FEATURE <mention class="mention" data-id="43576" data-type="work_package" data-text="#43576">#43576</mention>).
* Create a link between a work package and an existing file in Nextcloud (FEATURE <mention class="mention" data-id="43657" data-type="work_package" data-text="#43657">#43657</mention>).
* Chose a file from Nextcloud via a _file picker (FEATURE <mention class="mention" data-id="43654" data-type="work_package" data-text="#43654">#43654</mention>)_
* Create a _file link_ between the work package and the file
* Upload a file from within a work package in OpenProject (FEATURE <mention class="mention" data-id="43656" data-type="work_package" data-text="#43656">#43656</mention>).
* Chose a location in Nextcloud via a _location picker (FEATURE_ <mention class="mention" data-id="43655" data-type="work_package" data-text="#43655">#43655</mention>_)_
* Save the file in Nextcloud
* Create a _file link_ between the work package and the file
* Delete _file links_ from a work package without
* Allow users to drag and drop files in both attachments and Nextcloud (FEATURE <mention class="mention" data-id="43577" data-type="work_package" data-text="#43577">#43577</mention>).
* Make the previous use cases available through work package copy and creation (FEATURE <mention class="mention" data-id="43578" data-type="work_package" data-text="#43578">#43578</mention> and <mention class="mention" data-id="41524" data-type="work_package" data-text="#41524">#41524</mention>).
### Generic visuals
<img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36987/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36988/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/36989/content"><img class="op-uc-image op-uc-image_inline" src="/api/v3/attachments/37083/content">
###
### Implementation chunks:
* File picker for selecting link targets (files and directories). Queries Nextcloud with the user's access token (probably via WebDAV). Tunneled through OpenProject backend.
* Location picker for upload targets (a target is always a directory). Queries Nextcloud with the user's access token (probably via WebDAV). Tunneled through OpenProject backend.
* If possible, direct upload of files to Nextcloud without tunneling through OpenProject server. This requires some sort of one-time upload tokens, which can get exposed to the OpenProject frontend. Fallback could be tunneling all uploaded files through OpenProject.
* Remove file links from OpenProject when files get deleted in Nextcloud (either some sort of callback triggered by Nextcloud or through polling when user opens the _Files_ tab).
### Implementation decisions:
* The file name we present in OpenProject is the name of the file that the file's owner sees. Apparently in Nextcloud a file can have multiple names and paths every time a file gets shared. To have a "canonical" name for all OpenProject users we will always show the file name that the file's owner sees.
* OpenProject updates the "cached" file name in OpenProject when a user open the _Files_ tab.
### Out of scope:
* Syncing of access rights to the files in Nextcloud according to the roles and privileges of members in a OpenProject project. That will get partly tackled later with shared project folders (<mention class="mention" data-id="41400" data-type="work_package" data-text="#41400">#41400</mention>)
* Linking between a OpenProject project (instead of work packages) and files in Nextcloud. That is feasible and intended to built in a later stage. The outlook could be a possible replacement for the current "Documents" module.