gpt4 book ai didi

image - Grails:-如何在文件系统中显示图像

转载 作者:行者123 更新时间:2023-12-02 15:15:05 24 4
gpt4 key购买 nike

我需要显示不在grails的项目目录中的文件系统中的图像。
我用了

< img src="${createLinkTo(dir: '/Users/ME/ddImages/reg/', file: '${userInstance.fileName}.jpg')}" alt="User Photo"/>

但这似乎不起作用

有什么帮助吗?

最佳答案

顺便说一句,grails标签被描述,使用资源;该标签将使您进入应用程序的基本路径

http://www.grails.org/Tag+-+createLinkTo

img标签上的文档
http://www.w3schools.com/tags/att_img_src.asp

“src”的可能值

An absolute URL - points to another web site (like src="http://www.example.com/image.gif")
A relative URL - points to a file within a web site (like src="image.gif")

关于image - Grails:-如何在文件系统中显示图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3635186/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com