How can I abort a Catalyst upload based on Content-Length or MIME-Type?

ぐ巨炮叔叔 提交于 2019-12-06 07:19:32

Catalyst handles the upload before dispatch to your action. You will need to intercept earlier in the request handling process and that means a plugin, I suspect.

I am not an expert on uploads with Catalyst, but there may be something out there that already does this, so it's worth a search on cpan... but if not I'd look at how the Upload Progress plugin does what it does to get a status on the current upload. You should be able to kill the upload in a similar way.

JayK

also look at HTML::FormHandler::Model::DBIC which handles both these cases for you within it's built in validation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!