fields.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:Wagtail-Image-Folders 作者: anteatersa 项目源码 文件源码
def check_image_file_size(self, f):
        # Upload size checking can be disabled by setting max upload size to None
        if self.max_upload_size is None:
            return

        # Check the filesize
        if f.size > self.max_upload_size:
            raise ValidationError(self.error_messages['file_too_large'] % (
                filesizeformat(f.size),
            ), code='file_too_large')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号