Deep linking to preview file

alt=
DannyA
@dannya
10 years ago
584 posts
I am trying to push an mp4 of my preview file to twitter for use in their new Player Cards. We need to give twitter the URL of the mp4 in the data folder. Is there to whitelist a specific site to allow deep linking of a specific file (e.g. /data/media/1/1/19/sample.mp4)

jpg
 •  61KB


updated by @dannya: 01/13/15 11:25:41PM
brian
@brian
10 years ago
10,148 posts
There is a .htaccess file in data/media specifically designed to block this - if you must link directly to the file and are unable to go through the core "stream view (or a custom stream view) then you'll need to remove that .htaccess file, which will then upon your media directories (meaning someone could download a file outside of Jamroom if they know the name of the file).


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
10 years ago
584 posts
What about putting twitter on the allowed domains list?

The key here is that I only want to give access to the preview file. I'd be worried that someone on the twitter domain can access ALL the files in the folder if they figured out the naming conventions.

Can you elaborate on custom stream view? I didn't see anything in documentation. Could that be used for this?
brian
@brian
10 years ago
10,148 posts
The allowed domains list is not involved when you directly link to a file - that is only involved if you go through the stream/download views.

A custom stream "view" would be a view_jrCustomModule_stream function called like:

yoursite.com/yourmodule/stream/id=#

And you would use PHP to open the file and send it.

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags