0

Now I can import some ready made images into the image resources, present them as options to the end-user on the XPage, and then based on their selection, compute the 'style' property to update the background image. But it still doesn't let the user upload their own image as background.

Is there any way that doesn't involve image resource at all? I'm thinking of doing the normal fileupload control. Let the user upload an image as an attachment into a document and then somehow compute the style property by referencing the image in the attachment but I'm not sure how to do that or if that's doable at all.

4

2 回答 2

2

如果您将图像上传到“用户设置”文档并计算文档字段中的文件名,并在按用户名排序的视图中显示这些文档。使用登录的用户名获取文档的路径并计算图像的路径。路径应该看起来像这样。

数据库路径+名称/视图/UNID/$File/Filename

于 2013-11-11T07:27:07.837 回答
0

如果您使用 RichText Lite 字段来存储您的图像并将其设置为缩略图(没有大小限制),那么您可以指定一个固定的文件名(在字段属性的第二个选项卡上)

信息框设置

然后,您可以使用 Fredrick 提到的 URL 引用该附件。

于 2013-11-11T08:12:01.457 回答