Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

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

  • etc
  • etc's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 132
  • Thank you received: 19
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

Please Log in or Create an account to join the conversation.

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

  • JoomGuy
  • JoomGuy's Avatar
  • Offline
  • Moderator
  • Moderator
  • Joomla Enthusiast, Lover of Cooking
  • Posts: 1115
  • Thank you received: 195
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!!!

Please Log in or Create an account to join the conversation.

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

  • etc
  • etc's Avatar Topic Author
  • Offline
  • Premium Member
  • Premium Member
  • Posts: 132
  • Thank you received: 19
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.

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
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

Please Log in or Create an account to join the conversation.

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

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Also, in JDom, the direct/indirect option is working now.
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.107 seconds

I'm playing around with the new mvc and the FORK feature is FANTASTIC!!! it's saving me a lot of time! you are doing a very good job!!

Tomaselli (Forum)  

Get Started