goldsky / FileDownload-R

FileDownload snippet for MODX revolution
12 stars 7 forks source link

Why keeping full file paths in the tables instead of relatives? #56

Open manicko opened 7 years ago

manicko commented 7 years ago

At the moment snippet is storing full paths in the table e.g

/home/srv1/site.ru/assets/files/pic.jpg

if i move to the other hosting it will be /www/srv2/site.ru/assets/files/pic.jpg

so the count of downloads will start from zero. Why not to keep the relative paths in the table?

I mean assets/files/pic.jpg?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/39044453-why-keeping-full-file-paths-in-the-tables-instead-of-relatives?utm_campaign=plugin&utm_content=tracker%2F1480317&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1480317&utm_medium=issues&utm_source=github).
goldsky commented 7 years ago

You can add &mediaSourceId property to the snippet's call. Eg:

[[!FileDownload?
&mediaSourceId=`1`
&getDir=`assets/downloads`
&browseDirectories=`1`
&directLink=`1`
]]