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

How to Prevent Automatic Upload in UploadSetwithTable? Critique on Predefined Upload Flow #4176

Open
luizcarlospedrosogomes opened this issue Dec 27, 2024 · 1 comment

Comments

@luizcarlospedrosogomes
Copy link

Hello SAP Team,

I am currently working with the UploadSetwithTable control and encountered a limitation regarding the automatic upload behavior. While exploring the documentation and the implementation in the UploadSetwithTable.js file, I noticed that there is no clear or documented way to completely prevent automatic uploads. This poses challenges for scenarios where the upload process needs to be fully controlled by the application logic.
Issue Details:

Automatic Upload by Default:
    It seems that UploadSet and its derivatives, such as UploadSetwithTable, are designed to start uploads automatically unless explicitly configured otherwise.
    There is no apparent method or property exposed in the UploadSetwithTable API that directly disables this behavior.

Lack of Control:
    In many enterprise-grade applications, the upload process is highly dependent on business rules or user interactions. Forcing a predefined upload flow makes it harder to integrate these controls seamlessly.
    Even though there are events like beforeUploadStarts, using these as workarounds to prevent uploads can lead to less maintainable code.

SAP's Approach to Upload Flow:
    While I understand the intent behind simplifying the user experience, the current implementation limits customization.
    By enforcing a specific upload flow, it can lead to friction in adopting the control in complex use cases where developers need full control over the file lifecycle (e.g., validations, approvals, manual uploads, etc.).

Questions and Suggestions:

Is there a documented or recommended way to disable automatic uploads in UploadSetwithTable?
Why does the control assume a specific upload flow instead of offering flexibility for custom logic?
I would suggest exposing a property like uploadAutomatically (similar to UploadSet) directly in UploadSetwithTable to allow developers to disable automatic uploads without relying on events or custom overrides.

Final Thoughts:

The UploadSet family of controls is powerful and useful for file handling in SAP applications, but the lack of flexibility in controlling the upload process can hinder its adoption in real-world enterprise scenarios. Providing developers with greater control over the upload lifecycle would make these controls more versatile and developer-friendly.

Looking forward to your feedback and thoughts on this matter

@GerganaKremenska GerganaKremenska self-assigned this Dec 30, 2024
@GerganaKremenska
Copy link
Member

Thank you for sharing this finding. I've created an internal incident DINC0370970. The status of the issue will be updated here in GitHub.

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

No branches or pull requests

2 participants