{"status":"success","message":"","http_code":200,"data":{"type":"message","id":"14278665","href":"/messages/14278665","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/major-updates-to-the-attachments-plugin-multi-cloud-support-malware/ba-p/14278665","author":{"type":"user","id":"9300","href":"/users/9300","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/9300","login":"rupamaity"},"subject":"Major updates to the Attachments plugin – multi-cloud support, malware scanning and more","body":"<P>The SAP Cloud Application Programming (CAP) model prides itself on enabling rapid application development by abstracting away complexities and letting developers focus on the domain.</P><P>CAP’s <SPAN><A href=\"https://cap.cloud.sap/docs/about/best-practices#the-calesi-pattern\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Calesi</A></SPAN> (CAP-level Service Interfaces) pattern takes this further by reducing the amount of boilerplate code developers need to write when integrating with SAP BTP services.</P><P>One such example of a useful plugin is the <A href=\"https://cap.cloud.sap/docs/plugins/#attachments\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Attachments</A> plugin. The CAP Attachments plugin enables developers to seamlessly add file upload and management capabilities to their applications, handling everything from storage integration to UI components out of the box. By abstracting the complexity of working with object stores and file handling it allows developers to implement secure, production-ready attachment functionality out of the box or with minimal code.</P><P>&nbsp;This plugin has been available for a while and is heavily adopted by the community. In response to developer feedback about missing features, documentation gaps, and bugs, we’ve spent the last few months upgrading the plugin, and the CAP team is excited to release the “new and improved” attachments plugin for in <SPAN><A href=\"https://github.com/cap-java/cds-feature-attachments#readme\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Java</A></SPAN> and <SPAN><A href=\"https://github.com/cap-js/attachments\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Node.js</A></SPAN>.</P><P>Here are the latest improvements:</P><P><STRONG>Feature parity –</STRONG> with the recent set of enhancements, both the Node.js (v 3.4.0 onwards) and Java (v 1.2.2 onwards) plugins now have the following features:</P><OL><LI>Multi-cloud support (GCP Storage, AWS S3, Azure Blob) - Deploy flexibly across cloud providers</LI><LI>Malware scanning on upload of attachments. (The Node.js plugin additionally supports mTLS authentication for the malware scanning service)</LI><LI>Enhanced monitoring and logging capabilities</LI></OL><P><STRONG>&nbsp;</STRONG><STRONG>New features currently available for the Node.js plugin only (v3.4.0 onwards):</STRONG></P><OL><LI>Multi-tenancy support for all storage providers</LI><LI>Dynamic visibility control for the attachments panel on the UI using <SPAN><A href=\"https://sapui5.hana.ondemand.com/sdk/#/topic/ca00ee45fe344a73998f482cb2e669bb\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">UI5 hidden facet</A></SPAN></LI></OL><pre class=\"lia-code-sample language-json\"><code>entity Books {\n  status : Integer enum {\n    submitted =  1;\n    fulfilled =  2;\n    shipped   =  3;\n    canceled  = -1;\n  };\n  @Former Member.Hidden : (status = #canceled ? true : false)\n  attachments: Composition of many Attachments;\n}</code></pre><P>&nbsp; &nbsp; &nbsp; &nbsp;3. Translations for all model texts in SAP-supported languages</P><P>&nbsp; &nbsp; &nbsp; &nbsp;4. Standard <EM>kind</EM> to let the plugin automatically decide which object store provider to use</P><pre class=\"lia-code-sample language-javascript\"><code>{\n  \"cds\": {\n    \"requires\": {\n      \"attachments\": {\n        \"kind\": \"standard\"\n      }\n    }\n  }\n}</code></pre><P>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;5.&nbsp;UI5 validation methods to define the maximum file size and accepted media types</P><pre class=\"lia-code-sample language-javascript\"><code>annotate my.Books.attachments with {\n  content @AcceptableMediaTypes: ['image/jpeg'] @Validation.Maximum: '2MB';\n}</code></pre><P>You can read the details on the <SPAN><A href=\"https://github.com/cap-java/cds-feature-attachments#readme\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Java</A></SPAN>&nbsp;and&nbsp;<SPAN><A href=\"https://github.com/cap-js/attachments\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">Node.js</A></SPAN>&nbsp;GitHub pages of the plugin.&nbsp;</P><P>&nbsp;</P><P>And this is not all. We have overhauled the documentation of both the plugins to make sure that you have the latest and most accurate information available.</P><P>The team strives to continue enhancing this and other plugins to provide developers with increased productivity.</P><P>In case you would like to share some feedback with us, please write to us on <SPAN><A href=\"mailto:cap@sap.com\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">cap@sap.com</A></SPAN></P><P>Ready to try it out? Happy coding!</P>","teaser":"<P class=\"\">The CAP Attachments plugin for Java and Node.js has been significantly upgraded with new features, including multi-cloud support (GCP Storage, AWS S3, Azure Blob), malware scanning, enhanced monitoring and logging, alongside improved documentation to boost developer productivity.</P>","board":{"type":"board","id":"technology-blog-sap","href":"/boards/technology-blog-sap","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/bg-p/technology-blog-sap"},"conversation":{"type":"conversation","id":"14278665","href":"/conversations/14278665","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/major-updates-to-the-attachments-plugin-multi-cloud-support-malware/ba-p/14278665","style":"blog","thread_style":"blog","messages_count":1,"solved":false,"last_post_time":"2025-12-02T08:24:01.573+01:00","last_post_time_friendly":"2025 Dec 02"},"topic":{"type":"message","id":"14278665","href":"/messages/14278665","view_href":"https://community.sap.com/t5/technology-blog-posts-by-sap/major-updates-to-the-attachments-plugin-multi-cloud-support-malware/ba-p/14278665"},"post_time":"2025-12-02T08:24:01.573+01:00","post_time_friendly":"2025 Dec 02","depth":0,"read_only":false,"edit_frozen":false,"language":"EN","can_accept_solution":false,"placeholder":false,"is_solution":false,"solution_data":{},"metrics":{"type":"message_metrics","views":1227},"current_revision":{"type":"revision","id":"14278665_10","last_edit_author":{"type":"user","id":"9300","href":"/users/9300","view_href":"https://community.sap.com/t5/user/viewprofilepage/user-id/9300","login":"rupamaity"},"last_edit_time":"2025-12-03T09:08:33.954+01:00"},"kudos":{"query":"SELECT * FROM kudos WHERE message.id = '14278665'"},"tags":{"query":"SELECT * FROM tags WHERE messages.id = '14278665'"},"labels":{"query":"SELECT * FROM labels WHERE messages.id = '14278665'"},"images":{"query":"SELECT * FROM images WHERE messages.id = '14278665'"},"videos":{"query":"SELECT * FROM videos WHERE messages.id = '14278665'"},"attachments":{"query":"SELECT * FROM attachments WHERE message.id = '14278665'"},"replies":{"query":"SELECT * FROM messages WHERE parent.id = '14278665'"},"ratings":{"query":"SELECT * FROM ratings WHERE message.id = '14278665'"},"custom_tags":{"query":"SELECT * FROM custom_tags WHERE messages.id = '14278665'"},"moderation_status":"approved","visibility_scope":"public","user_context":{"type":"user_context","kudo":false,"read":false,"can_reply":false,"can_kudo":false,"can_delete":false},"message_type":"blog_topic_message","popularity":1.1399218477619263E-5,"excluded_from_kudos_leaderboards":false,"latest_version":{"type":"friendly_version","major":"6","minor":"0"},"include_hidden_messages":true,"content_workflow":{"type":"content_workflow","state":"publish","message_draft_history":{"query":"SELECT * FROM message_draft_history WHERE message.id = '14278665'"},"user_context":{"type":"message_workflow_context","can_edit":false,"can_schedule":false},"view_href":"https://community.sap.com/t5/blogs/blogworkflowpage/blog-id/technology-blog-sap/article-id/186697"},"is_promoted":false},"metadata":{}}