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

Catch withMedia and withFiles to prevent uploads in Production #528

Open
tabacitu opened this issue Jun 28, 2023 · 0 comments
Open

Catch withMedia and withFiles to prevent uploads in Production #528

tabacitu opened this issue Jun 28, 2023 · 0 comments

Comments

@tabacitu
Copy link
Member

In #456 we were talking about preventing the uploads in a more general way. Pedro came up with this solution and I like it:


We can catch the withMedia and withFiles, with that we prevent the uploader events from beeing registered, so we wouldn't even need to bind into the uploader classes as they wouldn't be registered/called.

That wouldn't prevent much, just the upload from happening, but anything you submit in the input would be saved to the database, except it didn't go through the upload process.

At the moment we can't bind to our uploaders as they aren't resolved from the container, they are statically initialized.
We can work that out, or use the mutator as we are doing now. Everything is "working", except we always send empty values to the uploaders 🤷

Probably it's like you said, it's more future proof, but at the moment it's not a requirement.

Originally posted by @pxpm in #456 (comment)

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

No branches or pull requests

2 participants