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

Timeout when uploading large media files #1704

Closed
esandstedt opened this issue Aug 30, 2021 · 5 comments
Closed

Timeout when uploading large media files #1704

esandstedt opened this issue Aug 30, 2021 · 5 comments

Comments

@esandstedt
Copy link

esandstedt commented Aug 30, 2021

We've experienced the media component cancelling uploads after 30 seconds, which sets an implicit limit on file sizes.

After googling a bit, I found this issue which is quite similar.
https://github.com/flagscript/Flagscript.PiranhaCms.Aws.S3Storage/issues/28

I think it might have to do with the default timeout configuration option in Dropzone.js. It is 30 seconds.
https://www.dropzonejs.com/#configuration-options

@esandstedt
Copy link
Author

I discovered another issue with large files. The media upload endpoint uses the default max request body size of 30MB.
aspnet/Announcements#267

I worked around the issue by increasing the limit globally.

@tidyui
Copy link
Member

tidyui commented Sep 7, 2021

Hi there. The first one we could add a config setting for. The second one is by design as Piranha is a framework and can’t demand any specific max upload size by the application.

Regards

@tidyui tidyui added this to the Version 10.0.3 milestone Feb 8, 2022
@tidyui tidyui self-assigned this Apr 5, 2022
@tidyui tidyui closed this as completed in 68b2ec2 Apr 5, 2022
@tidyui
Copy link
Member

tidyui commented Apr 5, 2022

This can now be configured by setting the following in your Startup.cs:

Config.ManagerXhrTimeout = 60; // This sets the timeout to 60 seconds

@dmdmaasz6
Copy link

Good Morning All, do we have the solution in a dotnet core 6 project documented anywhere. I am having major issues with file uploads bigger than 10MB timing out, and I have tried it all but cannot seem to find the solution. Please let me know if there is a documented example of how to set the timeout in Program.cs of a dotnet core 6 or 7 solution with no startup.cs. Your assistance in this regard will be highly appreciated.

@tidyui
Copy link
Member

tidyui commented Aug 9, 2023

Hi there! The same applies in Program.cs, but as there’s no Configure() where you can get the Config injected you need to construct it yourself providing the IApi you have available.

https://github.com/PiranhaCMS/piranha.core/blob/master/core/Piranha/Config.cs#L229

Regards

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

3 participants