Closed (duplicate)
Project:
Linkit
Version:
7.x-3.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2013 at 23:12 UTC
Updated:
19 Apr 2014 at 22:48 UTC
Jump to comment: Most recent
Comments
Comment #1
gmclelland commentedOops, I thought I was running the latest dev. I just noticed that the latest dev now links to the file path itself. Great!
Maybe there should still be an option checkbox to "force download" when inserting a link to a file?
Comment #2
gmclelland commentedFYI... you can't link file/id/download anymore since token protection has been added to the latest file_entity-2.x-dev.
I think the best route is to continue linking directly to file like this module does now. If needed you might be able to use https://drupal.org/project/portable_path with this module to correct the links if the file is ever moved.
Comment #3
treksler commentedlooks like link it 3.x-dev links to file/%file
Also, it looks like linking to file/%file/download is a no go.
How do you propose one would link to a direct download of a file by fileid or token, without linking directly to the file on disk?
Seems like a fairly basic requirement of a file management system.
Comment #4
gmclelland commentedFrom what I understand in 2.x, linkit linked to directly to the file on disk.
In 3.x, linkit links to the file entity file/%id with the file_entity module?
To restore the 2.x way you can see/review the posted patch #2158107: files: link inserted does not point to download but to entity page ("/file/FID" instead of "/system/files/FILEPATH")
I no longer need the ability to link to file/%id/download.
Comment #5
treksler commentedThanks for the link to the patch. It gives me some ideas how to go forward.
My issue is that linking directly to the URL is IMO a bad idea.
My users will/might/could be switching files between private and public systems or renaming files, etc. Running hacks to fix filepath links in umpteen nodes and fields makes me come out in a cold sweat.
I think file/%id is better than linking to the URL. So, the patch in #2158107 is a step backwards.
I wish there was a display mode to print a link to the file, not to the entity (like file/%id/download was supposed to work)
Options.
1) make a patch to LinkIt that links to managed file id tokens instead? and use the input format from portable paths?
2) leave LinkIt alone and use http://drupal.org/project/rabbit_hole to redirect file entity pages to their download URLs
3) leave LinkIt alone and make an input format, which converts file/%id URLs to the file download URLs on display
PS
couldn't get rabbit hole to work, but was able to do the redirect via the "ctools page manager existing pages" module by overriding file/%fid and adding a variant for redirecting to %file:url
Comment #6
anonComment #7
anonComment #8
anonJust a heads up, There is a patch in #2158107: files: link inserted does not point to download but to entity page ("/file/FID" instead of "/system/files/FILEPATH").