图像大小未发生调整

发布于 2024-10-01 13:39:52 字数 279 浏览 0 评论 0原文

嘿伙计们,我正在尝试使用一个简单的 cfimage 来调整 tmp 图像的大小,但它不起作用......我做得正确吗?

<cfimage action="resize" height="300" source="#form.adminfileupload#" width="300" name="form.adminfileupload">

在执行该函数后,我尝试重命名 tmp 文件。这是在 ColdFusion 中执行此操作的正确方法吗?

谢谢

Hey guys, I am trying to use a simple cfimage to resize a tmp image but its not working... am I doing it correctly?

<cfimage action="resize" height="300" source="#form.adminfileupload#" width="300" name="form.adminfileupload">

After it goes through that function I am trying to rename the tmp file. Is this the proper way to do this in ColdFusion?

Thanks

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

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

发布评论

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

评论(1

゛清羽墨安 2024-10-08 13:39:52

如果您计划将数据保存到文件系统,请使用“目标”属性而不是“名称”属性。

我没有尝试过直接从上传调整大小。您可能需要使用 cffile 将临时副本写入可读目录,以便提供 cfimage 的完整文件路径。

If you plan to save the data to the filesystem, use the "destination" attribute instead of the "name" attribute.

I've not tried resizing directly from an upload. You may need to use cffile to write a temp copy to a readable directory in order to provide a full filepath to cfimage.

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