检查CKeditor上传的文件
我们正在构建一个类似博客的 Pylons Web 应用程序,它使用 CKeditor 并允许上传图像。我如何告诉 CKeditor 用户尝试了不可接受的上传?
例如,如果用户尝试上传 exe 而不是图像,我想引发某种错误并允许用户重新检查她尝试上传的内容。
现在我正在服务器端进行检查,但我不知道要返回什么。
We're building a blog-like Pylons web application that uses CKeditor and allows to upload images. How can I tell CKeditor that the user attempted an upload that isn't acceptable?
For example, if a user tries to upload an exe instead of an image, I'd like to raise some kind of error and allow the user to recheck what she's trying to upload.
Right now I'm doing the check server-side, but I can't figure out what to return.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
也许我可以返回一个可以解释问题的特定图像...不过,我很想听到任何替代解决方案。
Maybe I could return a particular image that explains the problem... I'd love to hear any alternative solution though.