-
Notifications
You must be signed in to change notification settings - Fork 139
Description
#785 introduced a new functionality for attachments (see also #74). The internal API contains two new straight-forward endpoints:
POST /notes/{noteid}/attachment
: uploads a new attachment to a note and returns the relative filepathGET /notes/{noteid}/attachment?path={path}
: downloads an existing attachment using the relative filepath
I would like to expose this functionality also to the external API so that third-party apps can use it. However, I'm not sure, if these endpoints are sufficient for you app developer @nextcloud/notes @stefan-niedermann. Therefore, please provide feedback!
What I have in mind is the following: when there are these two API changes only, your app will have to parse a note for image tags (e.g. 
) and (optionally) links (e.g. [label](relative link path)
) and then run subsequent requests to the GET attachment endpoint.
Another alternative is to do this parsing (also) on the server and provide a list of attachments together with the note's response (new attribute besides title
, content
etc). However, this will slow down synchronization and your app will still have to parse the note in order to show those images.
Hence, I vote for staying with these two changes (just add GET attachment and POST attachment) and the client will have to do the rest. Do you agree with this approach or do you see any other requirements for this API? @nextcloud/notes @stefan-niedermann