取消 Rails/Spree 图片上传限制?

发布于 2024-09-27 17:11:18 字数 170 浏览 2 评论 0原文

我的客户今天打电话来,因为他们无法将图像上传到他们的购物网站,而且我完全不知道上传文件大小限制是在哪里配置的。

这是我的服务器配置:Ubuntu 10.04LTS、Spree on Rails 2.3、Nginx。

基本上我想删除文件大小上传限制。

有人知道我应该从哪里开始吗?

My client called today because they couldn't upload their images to their shopping site, and I have absolutely no idea where the upload file size limits are configured.

So here's my server configuration: Ubuntu 10.04LTS, Spree on Rails 2.3, Nginx.

Basically I want to remove the file-size upload limit.

Anyone know where I should go to get started?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

网名女生简单气质 2024-10-04 17:11:18

你检查过你的 Nginx 配置了吗?

更具体地说, client_max_body_size 指令?

为了确保您的 Spree 安装不会拒绝该文件,请在本地启动 script/server 并尝试向其中上传一个大文件。

Have you checked your Nginx config?

More specifically the client_max_body_size directive?

To make sure your Spree install is not rejecting the file, fire up script/server locally and try uploading a big file to it.

陌路终见情 2024-10-04 17:11:18

Spree 使用 Paperclip (http://github.com/thoughtbot/paperclip) 进行图像处理和管理。您还可以检查那里的大小限制。

Spree uses Paperclip (http://github.com/thoughtbot/paperclip) for it's image processing and management. You might also check there for a size limit.

单调的奢华 2024-10-04 17:11:18

请务必查看 spree 用户 google 群组,了解与 Spree 相关的问题。您可能会在那里得到更快的回复。

Be sure to also checkout spree-user google group for Spree-related questions. You might get a faster response there.

断肠人 2024-10-04 17:11:18

那么您真的希望您的客户将他们的 DSLR 中的 18 兆像素图像直接上传到网站吗?或者,您是否问过他们要上传的图像有多大?正如其他人已经说过的,有几个地方可以限制文件大小。此外,图像文件可能会被编码,因此限制可能比您预期的要低得多。

So you really want your client to upload their 18 megapixel images from their DSLR directly to the site? Or, did you ask them how large the images are they want to upload? As others already said, there are several places where file size can be limited. In addition, the image files might be encoded, so the limit can be much lower than you'd expect.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文