Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of Rename attachments feature in SDM Java Plugin #226

Closed
yashmeet29 opened this issue Oct 9, 2024 · 4 comments
Closed

Support of Rename attachments feature in SDM Java Plugin #226

yashmeet29 opened this issue Oct 9, 2024 · 4 comments

Comments

@yashmeet29
Copy link

yashmeet29 commented Oct 9, 2024

I am part of the team that is developing the SDM plugin. I am working on rename attachment feature for SDM Java plugin. Rename of the attachment in SDM repository should happen after entity is saved. I saw there is no specific rename attachment feature in cds-feature-attachments plugin. So I want to understand to support this feature in SDM plugin, do I need to add my rename implementation CreateAttachmentHandler & UpdateAttachmentHandler or there are other way too.
I am attaching a recording of similar feature from node-js SDM plugin.

Screen.Recording.2024-10-09.at.4.13.50.PM.mov

Regards,
Yashmeet

@mofterdinger
Copy link
Collaborator

mofterdinger commented Oct 10, 2024

Hi, I'm currently integrating the cds-feature-attachment into our Bookshop sample application and I can rename the filename without out-of-the-box as you can see on the following screenshot:

image

Sorry, I don't know your implementation, but maybe @BraunMatthias or @adamandre79 have an idea.

Thanks,
Markus

@mofterdinger
Copy link
Collaborator

@yashmeet29 Hi, is your SDM Plugin a copy of the cds-feature-attachment? I found that you are using your own CDS Model: https://github.com/cap-java/sdm/tree/develop/sdm/src/main/resources/cds/com.sap.cds/sdm
with own UI annotations.

Please explain how is the relation of your plugin with the cds-feature-attachment.

Thanks,
Markus

@yashmeet29
Copy link
Author

Hi @mofterdinger, no SDM plugin is not a copy of cds-feature-attachments rather it uses SAP Document Management Service as storage for attachments. So, basically it is the SDM flavour of attachments plugin. SDM plugin inherits most of the things from cds-feature-attachments. Actually in our cds models we needed some extra fields like repositoryId, folderId, url. So, we added other fields from cds-feature-attachments and added added fields too.

@adamandre79
Copy link
Collaborator

Hello @yashmeet29 ,

as discussed before, please do not copy the cds model and add you new fields, but use the cds model with all the annotations from the attachments plugin and only extend it with your fields.
See also my comment in: #189 (comment)
After that is done you can discuss additional requirements with @BraunMatthias .

Regards
André

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants