Hi everyone,
I'm looking for a function that would give me the url of a file (image) from the owner of the image. Just like it is possible to get the iconUrl of a user... How would you write such a function ?
function get_file_url(file_name, owner_guid) {
// file_name == 'background' for instance
// returns something like the src of a user avatar...
return the_url ;
// the_url can then be used in the html : "style='background:url(the_url)'"
}
I'm lost, don't know how to do it properly.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- ihayredinov@ihayredinov

ihayredinov - 0 likes
You must log in to post replies.You need to create a custom page handler and add your logic there. The files in data directory do not have a URL.
Take a look at the files plugin and see how the image icon URL are built.