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

图片压缩怎么设置?还有设置上传图片大小。 #16

Closed
yuzg667 opened this issue Oct 3, 2018 · 4 comments
Closed

图片压缩怎么设置?还有设置上传图片大小。 #16

yuzg667 opened this issue Oct 3, 2018 · 4 comments

Comments

@yuzg667
Copy link

yuzg667 commented Oct 3, 2018

No description provided.

@istommao
Copy link
Owner

istommao commented Oct 4, 2018

目前还没有这个功能,后期可以加上

@yuzg667
Copy link
Author

yuzg667 commented Nov 1, 2018

当前有没有其他方法控制上传图片的?

@istommao
Copy link
Owner

istommao commented Nov 1, 2018

SIMDITOR_CONFIGS = {
    'toolbar': SIMDITOR_TOOLBAR,
    'upload': {
        'url': '/simditor/upload/',
        'fileKey': 'upload',
        'image_size': 1024 * 1024 * 4   # max image size 4MB
    },
    'emoji': {
        'imagePath': '/static/simditor/images/emoji/'
    }
}

大小限制加了 image_size @yuzg667

@yuzg667
Copy link
Author

yuzg667 commented Nov 5, 2018

SIMDITOR_CONFIGS = {
    'toolbar': SIMDITOR_TOOLBAR,
    'upload': {
        'url': '/simditor/upload/',
        'fileKey': 'upload',
        'image_size': 1024 * 1024 * 4   # max image size 4MB
    },
    'emoji': {
        'imagePath': '/static/simditor/images/emoji/'
    }
}

大小限制加了 image_size @yuzg667

最新代码亲测有效,谢谢!该问题已解决

@yuzg667 yuzg667 closed this as completed Nov 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants