Linking to files in Shared File Modules - is FileID gone?

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
9/8/2011 9:51:16 AM
Gravatar
Total Posts 133
J

Linking to files in Shared File Modules - is FileID gone?

I have shared file modules in a number of pages but have been asked to create a page that lists them all From trawling around in here I found several references to

In code you can build an url to the file in this format:

~/SharedFileDownload.aspx?pageid=x&mid=y&fileid=z

but I do not have a fileid in mp_sharedfiles - either I am being stoopid or the schema has changed. I realise the security context implications of doing this.

Cheers

John

9/8/2011 10:10:13 AM
Gravatar
Total Posts 133
J

Re: Linking to files in Shared File Modules - is FileID gone?

OK Got it fileid = itemid

link /sharedfiles/download.aspx?mid=nn&pagid=nn&fileid=nn working a treat

NOT /sharedfiledownload.aspx

Cheers

9/8/2011 10:17:00 AM
Gravatar
Total Posts 18439

Re: Linking to files in Shared File Modules - is FileID gone?

Hi John,

Ok if that works for you but Shared Files was not designed for linking to files from other content, it is designed mainly for sharing files securely by roles so that only users with permission can download the file. I guess it can work ok like you are trying to use it but only if the shared files instance is configured to allow anyone to download. If its configured for only certain roles then those links would not work unless the user was in the allowed role.

For just a list of public links you could just as easily use a plain old html feature and upload the files using the link dialog in the wysiwyg editor, though I suppose one advantage of the shared files is that it keeps track of download counts.

Best,

Joe

9/8/2011 10:25:05 AM
Gravatar
Total Posts 133
J

Re: Linking to files in Shared File Modules - is FileID gone?

I do understand that Joe -  the users want to put related files in pages in different parts of the site and like the way that SF module works but also want have an overall publications list - so this way works for me - they get the download counts and description indexing and a sort of library page - if I just did it the old simple way I would have 2 copies of most of the files one in the Db and one in the filesystem which in the long run would be a maintenance issue.  I know that for sure I wrote their original site 6 years ago and have been supporting them since. ;)

J

You must sign in to post in the forums. This thread is closed to new posts.