Skip to content

Add Configurable Throttling Mechanism to Limit Concurrent File Uploads and Virus Scans and/or queue for processing uploads #264

@vlovini

Description

@vlovini

Is your feature request related to a problem? Please describe.
Yes. The cap-js/attachments plugin currently does not provide any built-in throttling mechanism for handling simultaneous file uploads. This becomes problematic when the number of concurrent uploads exceeds the limit of the SAP Malware Scanning Service (30 simultaneous requests), potentially causing scan failures. When this happens, the attachment status fails, and the user must manually delete and re-upload the file.

Describe the solution you'd like
Introduce a configurable throttling mechanism in the plugin. Ideally, this would:

  • Allow setting a maximum number of simultaneous upload/scan requests (e.g., via environment variable or plugin config).
  • Alternative: Internally use a semaphore or queue to delay excess requests until a slot is available.
  • Optionally provide a retry mechanism or queue timeout handling.

Additionally, it would be helpful to:

  • Provide an action or API to re-trigger the virus scan on failed attachments, so users don’t have to delete and re-upload files manually.

Describe alternatives you've considered

  • Implementing throttling externally at the application level (adds complexity and duplicates logic).

Additional context
Reference: SAP Malware Scanning Service – What is it?
The service supports up to 30 simultaneous requests. Exceeding this limit can cause failures that are hard to recover from without user intervention.

Have you already checked existing issues before creating a feature request?
Yes, no similar feature request was found.

Customer Info
Company: SAP

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions