Currently, the URl is generated as e.g "webfm_send/5". With the change below, the URL will be generated as "webfm_send/5/filename.ext". This is especially practical when viewing documents in a browser or saving them, because now the filename is preserved.
The function Webfm.generateFileHref in file /js/webfm.js has to modified as follows (added "/title")
---------------------------------------------------------------
string = "" + title + "";
string = "" + title + "";
--------------------------------------------------------------
full function:
---------------------------------------------------------------
Webfm.generateFileHref = function(obj, url) {
if(typeof url == 'undefined') {
url = getBaseUrl();
}
var title = '';
if(typeof obj.ftitle != "undefined" && obj.ftitle != null && obj.ftitle.length)
title = obj.ftitle;
else
title = obj.element.title.substring(obj.element.title.lastIndexOf("/") + 1);
if(getWebfmCleanUrl()) {
string = "" + title + "";
} else {
string = "" + title + "";
}
return string;
}
-------------------------------------------------------------------
| Comment | File | Size | Author |
|---|---|---|---|
| webfm.patch | 742 bytes | j.miserez |
Comments
Comment #1
nhck commentedThere already is this functionality:
#390252: Pretty URLs instead of "webfm_send"
Comment #2
ae860300 commented// 2009 judy file url Full path---------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------------
return string;