Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts

    How should my files be named/saved before uploading to host?

    I may have gotten ahead of myself when I started writing my website, thank God it's a small site...five pages and one external style sheet and some images. Every one of my files were saved to desktop and not in a folder, all of the files are just kind of free floating on my desktop. The url for everything ends in "C:\User\Craig\Desktop".
    Is there anything I should do, like rename or change the file path before I upload everything to a server? I'm new at this and this is my first website and quite possibly my last. I learned just enough coding to make this one site, I really don't plan on any more but you never know.
    Can I transfer my files as they are or do I need to put them all in a folder (if so how?). Like I said, I'm new at all of this and want to make sure I understand what I'm doing before I get into it.......THANKS!

  • #2
    evo
    evo is offline
    waka Ionsurge
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    895
    Thanks
    5
    Thanked 12 Times in 12 Posts
    You need to make them into relative paths, in your case just use a filename.

    In future keep everything organised!

  • #3
    New to the CF scene
    Join Date
    Mar 2012
    Posts
    9
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by evo View Post
    You need to make them into relative paths, in your case just use a filename.

    In future keep everything organised!
    You mean like so....C:\User\Craig\Desktop\image2

  • #4
    evo
    evo is offline
    waka Ionsurge
    Join Date
    Feb 2005
    Location
    United Kingdom
    Posts
    895
    Thanks
    5
    Thanked 12 Times in 12 Posts
    I.e

    Code:
    <img src="photo.jpg" alt="" title="" />
    To explain, when you're uploading those files to a server you need to be using the file path to the filename relative to the location of wherever you are calling an external element from. In my case photo.jpg. My example indicates that photo.jpg will be in the same folder as the file I am calling it from, index.html.

    For your host "C:\User\Craig\Desktop\image2.jpg" won't be exist, as this is referred to a hard link. Still it will not work as a file path shares the same structure as web pages, such as http://www.site.com/photo.jpg.

    Bear in mind always that you also should keep filenames and extensions in lowercase and void of spaces so "photo of me.jpg" should be "photoofme.jpg" or "photo_of_me.jpg".

    Hopefully this makes some sense to you.


  •  

    Posting Permissions

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