nextcloud / nextcloud/deck

Document attachments in API v 1.1/(Deck 1?3+)

Open
#2,874 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs feature: api feature: attachments technical debt
Dominant language
JavaScript
Stars
1.4k
Forks
354
Avg merge
1d 10h
Merged PRs (30d)
43

Description

Describe the bug
Starting with Deck 1.3.0, the attachments property of a card is an empty array. The Deck Android app is no longer able to display attachments.

To Reproduce
Steps to reproduce the behavior:

  1. Install Deck 1.3.0
  2. Install Deck Android 1.14.6 (or any other version)
  3. Add a new attachment via Web UI
  4. Do not see it the attachment

Expected behavior
Obvious, API should deliver the attachments as with version 1.2.0

I'm just the UI guy, but i think the called endpoint is this:

/boards/{boardId}/stacks/{stackId}/cards/{cardId}
{
    "title": "130 buggy",
    "description": "",
    "stackId": 505,
    "type": "plain",
    "lastModified": 1615300299,
    "lastEditor": "stefan",
    "createdAt": 1615300016,
    "labels": [],
    "assignedUsers": [],
    "attachments": [],             // → Here's the error
    "attachmentCount": 1,          // → LOL
    "owner": {
        "primaryKey": "stefan",
        "uid": "stefan",
        "displayname": "Stefan Niedermann",
        "type": 0
    },
    "order": 999,
    "archived": false,
    "duedate": null,
    "deletedAt": 0,
    "commentsUnread": 0,
    "id": 756,
    "ETag": "7273ce30eb6e6132d944bf27b6f6f181",
    "overdue": 0
}
Server details

Operating system: Don'tk now

Web server: Apache

Database: MySQL

PHP version: 7.4

Nextcloud version: 21

Where did you install Nextcloud from: Upgrade since a few versions

Signing status:

Login as admin user into your Nextcloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Nextcloud configuration:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or

Insert your config.php content here
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Logs
Nextcloud log (data/nextcloud.log)
Insert your Nextcloud log here
Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the /boards/{boardId}/stacks/{stackId}/cards/{cardId} endpoint and trace how a card's attachments are assembled. Reproduce the case with Deck 1.3.0 and an attachment, then verify that the API returns the attachment data instead of an empty array and that it remains consistent with attachmentCount.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.