保护匿名图像上传
www.ebayclassifieds.com 等网站允许用户上传图像,以便在发布内容之前查看缩略图预览并进行图像调整。访问者可以在未经任何事先授权的情况下匿名将图像上传到这些网站。
是否可以为具有带宽和磁盘空间限制的较小站点完成相同类型的图像预览?我猜想人们会设置一个 cron 作业来定期删除匿名上传的图像。但是,如果有人试图通过上传虚假图像向您的网站发送垃圾邮件,可以采取哪些其他措施来确保带宽使用和磁盘空间不失控?
Sites like www.ebayclassifieds.com let users upload images in order to see thumbnail previews and make image adjustments before posting content. Visitors are able to upload images to those sites anonymously without any authorization beforehand.
Can the same type of image previews be done for a smaller site that has bandwidth and disk space constraints? I'd guess that one would set up a cron job to periodically delete images that were anonymously uploaded. But what are other measures that can be taken so that bandwidth usage and disk space don't get out of hand, in case someone tries to spam your site with bogus image uploads?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
以下是我的一些想法:
Here are some ideas off the top of my head:
除了 madisonw 的答案之外,我还想补充一点,也使用验证码进行上传,这样用户就无法使用自动化工具来大量上传图像......
Besides madisonw's answer I would just add, use CAPTCHA for the upload as well, so users can't use automated tools to upload the images at large...