Welcome, Guest
Username: Password: Remember me

TOPIC: [FIXED] direct/indirect file link again

direct/indirect file link again 20 Mar 2013 06:59 #6981

  • etc
  • etc's Avatar
  • Offline
  • Premium Member
  • Posts: 132
  • Thank you received: 19
  • Karma: 7
My situation is simple: I need to play video (ogv format) within HTML5 standard that I uploaded via j-cook native file uploader or image picker. The URL provided by j-cook looks like this:
index.php?option=com_component&task=file&path=[DIR_VIDEO]video.ogv
and this forces me to download the file. That means it is not usable for playing video. Probably I need to execute this file.

Any idea?

thank you
The administrator has disabled public write access.

Re: direct/indirect file link again 22 Mar 2013 15:14 #6994

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
  • Karma: 64
Hi @etc,

This is to do with indirect access being set true in the JDom call to render the file type field. Firstly, switch this to off or false. In your JDom call you should see a reference to your CONTANT_PATH (the path to your files directory for items in your current view in addition to the filename.ext for a given record.

This thread may help if you need to CHMOD files to access them: www.j-cook.pro/forum/32-trouble-shooting...-uploaded-files#6042

Hope it helps!

Gez
Need help with your Cook/Joomla Project? . PM me to find out what I can help with. NO time wasters please!!!
The administrator has disabled public write access.

Re: direct/indirect file link again 22 Mar 2013 19:50 #6997

  • etc
  • etc's Avatar
  • Offline
  • Premium Member
  • Posts: 132
  • Thank you received: 19
  • Karma: 7
Thanks. That is what I tried to do. I switched "indirect" to "false "but this gives me:
http://www.domain.com/[DIR_VIDEO]/test.ogv
which is not the correct link.

So for now I had to hack it a little. I used full path to my video dir and chmod of the dir I changed to 755.
But to be honest, this is not optimal.
The administrator has disabled public write access.

Re: direct/indirect file link again 07 Oct 2013 00:25 #11305

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Sorry for late answer.

The file access has been improved now

you can retreive your file direct URL using :
XxxxHelper::getFile('[DIR_VIDEO]/test.ogv', 'direct');

Have a look in the helper, the getFile() function can access in many ways. Also trough db access to check ACL...
Coding is now a piece of cake
The administrator has disabled public write access.

Re: direct/indirect file link again 07 Oct 2013 00:27 #11306

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 987
  • Karma: 140
Also, in JDom, the direct/indirect option is working now.
Coding is now a piece of cake
The administrator has disabled public write access.
Time to create page: 0.064 seconds

Get Started