2

I've created a class extension which allows uploading of an additional file (an image). The attribute name is "headingFile".

I now need to be get the URL for that image so I can display it.

I've been able to get information about the file with: $.getBean("fileManager").readMeta($.content('headingFile')) but can't find how I can get it's URL.

How do I get the URL for a file that has been uploaded with Class extension?

Thanks

Jason
  • 1,957
  • 2
  • 20
  • 34

1 Answers1

5

Try this

$.getURLForImage(fileid=$.content('headingFile'),size='large')

or

$.getURLForImage(fileid=$.content('headingFile'),width=600,height=300)

Or if it's not an image and you just want to download it

$.getURLForFile(fileid=$.content('headingFile'),method='inline')

or

$.getURLForFile(fileid=$.content('headingFile'),method='attachment')