hyper63 / hyper63/hyper-ext-model
feature: addAttachment
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
```js
await profiles.addAttachment(model_id, attachmentName, stream/file)
```
If the attachments flag is true, then use the `storage` service to add an unstructured object/file, then within the model, add the document name to a `$attachments` property, that lists all attachments added to this model document.
### Modes
- atomic: if the update to the data service fails, then rollback the upload of the file by deleting it
- non-atomic: if the update to the data service fails, then return the fact that the update operation failied even though the upload file was successful.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.