Closed Thread
Results 1 to 6 of 6

Thread: File Downloads .. relative or absolute

  1. #1
    devouk is offline Newbie
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    0

    File Downloads .. relative or absolute

    hi

    using ionfile 4.5.5

    sorry here with another question

    should we use absolute addressing when locating a file where a picture lives

    ie.
    hxxp://wxw.jangosplay.co.uk/new/images/stories/jangos/wallpapers/jangoswallpaper1.jpg

    or should i be able to use the following in the file url box

    ../images/stories/jangos/wallpapers/jangoswallpaper1.jpg

    or have i got the syntax wrong there..

    at the same time if it was possible to incorporate a "browse and click" ( i know i asking alot to be considered if relative addressing can be used) this would ensure correct syntax from idiots like me .. lol

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest

    Re: File Downloads .. relative or absolute

    Either method will work, however, you cannot put ../ in the relative. When you use relative it will append the Joomla Installation directory onto the file. For example, if my Joomla install lived at:

    /home/me/public_html/

    And I used /images/wallpaper1.jpg as the URL ionFiles will append that and use:

    /home/me/public_html/images/wallpaper1.jpg

    Do not include /home/me/public_html/ yourself though. The reason for this method is so that users with allow_url_fopen set to off can still pipe downloads to their users. Are you have any problems?

  4. #3
    devouk is offline Newbie
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    0

    Re: File Downloads .. relative or absolute

    ok jordan.. i have had some sleep now.. lol.. let me share my findings.

    i added a file to a joomla images directory

    created a ionfiles url of images/downloads/wallpapers/jw1.jpg

    set to display as a link for testing purposes in which i then get a hyperlink of

    hxxp://jangosplay.co.uk/home/sites/jangosplay.co.uk/public_html/images/downloads/wallpapers/jw1.jpg

    the file does exisit if manual type it to a browser address bar

    hxxp://jangosplay.co.uk/images/downloads/wallpapers/jw1.jpg

    will it be anything to do with seo settings in joomla.. ????

    or is it because it a absolute root path setting as part of the link due to my server provider give us a shared host and the ftp has a root access and a public_html area

    i am sorry not very unix friendly lol..

    look forward to your idea and explanations

    thanks

  5. #4
    Jordan Guest

    Re: File Downloads .. relative or absolute

    Don't use a relative path (/images/downloads/wallpapers/jw1.jpg) if you intend on setting the file as a link. Use the full URL path.

  6. #5
    devouk is offline Newbie
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    0

    Re: File Downloads .. relative or absolute

    ok sorry i only did this to see if this help you out ...

    i want to create download links .. ie so people can download a simple wallpaper ...

    i keep getting 0 byte files when i use the absolute path

    so how can i debug this situation .. or can i leave you a pm.. and give u access to the backend of the site so u can show me how it should be done...

    i am sorry to be a pain .. but i did this website as a favour and i just want to finish it now.. as it been dragging ... i appreciate your help but i feel i am a bit out my league here.

    i had a look at the php file and i see debugging comments.. which i presume i unremark... but where does the debug information go ?

    i do appreciate your replies..

  7. #6
    devouk is offline Newbie
    Join Date
    Aug 2008
    Posts
    10
    Rep Power
    0

    Re: File Downloads .. relative or absolute

    its ok jordan i perservered and cracked it...

    had a couple of red herrons which were throwing me out..

    joomla cache - bad thing ... lol so i probably did crack it days ago but kept changing and changing it... thinking i was doing wrong.

    since the files where required for download links
    i used relative addressing and set to download link

    and the thing that finally cracked it for me.. was starying me in the face.. i used the screenshot image and put the same url and turn the feature on from the ionfiles configuration to use a test preview without doing the link...

    no screenshot preview doing something wrong.. lol

    anyway i going to get this out the way.. and try and sit down and log my finding a produce a idiots guide intro ... and give as a simple download ... and maybe allow people to get to grips with things a bit easier..

    oh btw congratulations on your zend certification ...

    as always many thanks.. ionfiles is a project for me which is much appreciated..

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Relative Path
    By Goodluck in forum General Programming
    Replies: 3
    Last Post: 02-24-2009, 11:44 PM
  2. CSS: Absolute position
    By Lop in forum JavaScript and CSS
    Replies: 8
    Last Post: 06-03-2007, 12:13 AM
  3. Linking strategy - absolute vs relative
    By Carrym in forum Search Engine Optimization
    Replies: 10
    Last Post: 05-09-2007, 08:08 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts