evolution-api icon indicating copy to clipboard operation
evolution-api copied to clipboard

Allow configuring the default expiration time for Presigned Media URLs via Evolution Manager

Open EUrubatan opened this issue 8 months ago • 0 comments

Welcome!

  • [x] Yes, I have searched for similar requests on GitHub and found none.

What type of feature?

Functionality

What is the motivation for the request?

To provide greater flexibility in managing media link expirations across the Evolution ecosystem, allowing different retention strategies based on specific integration needs, such as enhanced security or long-term archiving.

Usage Examples

Possible settings for the default media link expiration:

3600 seconds (1 hour)

86400 seconds (1 day)

604800 seconds (7 days – current behavior)

2592000 seconds (30 days)

99999999 seconds (virtually permanent)

[Custom field to manually enter any expiration time]

How should the feature be developed?

A new configuration field should be added to the Evolution Manager panel: "Default Expiration Time for Media Links (in seconds)".

This configuration should be read whenever generating a Presigned URL (WebSocket, Webhook, REST API).

If no custom configuration is set, the default behavior (7 days) should continue to apply for full backward compatibility.

Internally, it would simply involve passing the configured expiry value to:

minioClient.presignedGetObject(bucketName, objectName, expiry);

Optionally, allow future overrides at runtime per specific API call if needed.

Additional Notes

This improvement is small and localized: only an additional configuration needs to be read and passed internally.

It significantly improves flexibility and integration capabilities without breaking existing systems.

It positions Evolution API as a more scalable solution for professional environments, covering security-sensitive and long-retention use cases.

EUrubatan avatar Apr 28 '25 16:04 EUrubatan