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

TOPIC:

Path to file 05 Feb 2013 10:56 #6630

  • Ferm
  • Ferm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
Hi,

Simple question. I looked through the forum but I couldn't find this.

I am using the "file" type in a table to upload a document. Is there a simple way to get the full path to the file from JDOM?

If I call JDom::_('html.fly.file.default') and set indirect to false, it will return html code including the path but I can't figure out ho to only get the path so that I can access the file directly in the component.

Sorry if this has already been asked and anserwed.

E

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

Re: Path to file 05 Feb 2013 12:00 #6631

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

You might want to check out this topic: www.j-cook.pro/forum/32-trouble-shooting...-uploaded-files#6042

It's not strictly what you want to do but may help.

BTW, what kind of file is it? Is it a PDF that you want to display in the browser or to give download link?

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: Path to file 05 Feb 2013 21:51 #6644

  • Ferm
  • Ferm's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 39
  • Thank you received: 6
Thanks for your answer. I think that is a different question though. It is not a big problem as it is easy to put together the path to the file. I was just curious if I could get it with a simple call to a JDOM method.

E

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

Re: Path to file 05 Feb 2013 22:46 #6645

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

Sure, JDom is totally customisable, just:
  1. take one of the classes (and its assets etc)
  2. clone it
  3. rename it
  4. rename the class(es)
  5. make any adjustments you require such as chmod'ing the file on upload, changing path, adding js (Ajax uploader) or whatever.
Start with a class close to the type you require - so, as you're already doing, start with file class.

A good place to look at an example of customising JDom is in the tutorial: j-cook.pro/docs/tutorials

do you need to render the file in browser or link to download?

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.

  • Page:
  • 1
Time to create page: 0.076 seconds
I have been using Cook for only a day now and it is the next best thing to Jagermeister. It is very easy to use and I see some of the greatest Joomla Components ever! coming from Cook users.
Naude (Forum)

Get Started