RDoc-3767 Copy attachments via Patch Scripts#2371
Merged
reebhub merged 2 commits intoravendb:mainfrom Apr 13, 2026
Merged
Conversation
golan22888
reviewed
Apr 13, 2026
| | Return value | Description | | ||
| |--------------|-------------| | ||
| | `true` | The attachment was copied successfully. | | ||
| | `false` | The source document or the source attachment was not found. No exception is thrown. | |
There was a problem hiding this comment.
do we want to add here the case when the destination document is not found?
golan22888
reviewed
Apr 13, 2026
| |----------------------------------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------------------| | ||
| | **attachments(document, attachmentName)<br/>.remote(destinationID, uploadTime)** | `void` | Updates the document's metadata with remote parameters to schedule the attachment for upload to remote storage.<br/>See [Schedule attachment for remote upload](../../document-extensions/attachments/store-attachments/store-attachments-remote.mdx#schedule-existing-attachments-for-remote-upload). | | ||
| | **attachments(document, attachmentName)<br/>.delete()** | `void` | Deletes the specified attachment from the document.<br/>See [Delete attachment via patching](../../document-extensions/attachments/delete-attachment.mdx#delete-attachment---via-a-patch). | | ||
| | **attachments(targetDocument, targetAttachmentName)<br/>.copyFrom(sourceDocId, sourceName)** | `boolean` | Copies an attachment from a source document to the target document with the specified name.<br/>Returns `true` on success, `false` if the source attachment does not exist.<br/>See [Copy attachment via patching](../../document-extensions/attachments/copy-move-rename.mdx#copy-attachments---via-patching). | |
There was a problem hiding this comment.
what about those cases:
destination doc is not found?
source doc is not found?
Danielle9897
commented
Apr 13, 2026
| | Return value | Description | | ||
| |--------------|-------------| | ||
| | `true` | The attachment was copied successfully. | | ||
| | `false` | The source document or the source attachment was not found. No exception is thrown. | |
| |----------------------------------------------------------------------------------|-------------|-----------------------------------------------------------------------------------------------------------------| | ||
| | **attachments(document, attachmentName)<br/>.remote(destinationID, uploadTime)** | `void` | Updates the document's metadata with remote parameters to schedule the attachment for upload to remote storage.<br/>See [Schedule attachment for remote upload](../../document-extensions/attachments/store-attachments/store-attachments-remote.mdx#schedule-existing-attachments-for-remote-upload). | | ||
| | **attachments(document, attachmentName)<br/>.delete()** | `void` | Deletes the specified attachment from the document.<br/>See [Delete attachment via patching](../../document-extensions/attachments/delete-attachment.mdx#delete-attachment---via-a-patch). | | ||
| | **attachments(targetDocument, targetAttachmentName)<br/>.copyFrom(sourceDocId, sourceName)** | `boolean` | Copies an attachment from a source document to the target document with the specified name.<br/>Returns `true` on success, `false` if the source attachment does not exist.<br/>See [Copy attachment via patching](../../document-extensions/attachments/copy-move-rename.mdx#copy-attachments---via-patching). | |
|
|
||
| * **No exception is thrown** in the following cases: | ||
| * The source document does not exist. | ||
| * The source attachment does not exist. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue link
https://issues.hibernatingrhinos.com/issue/RDoc-3767/Copy-attachments-via-Patch-Scripts
Additional description
Document the new
copyFromscript method.Type of change
/templatesor readme)Changes in docs URLs
/scripts/redirects.jsonfile, setDocuments MovedPR label)Changes in UX/UI