Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-05-2012, 04:40 PM   PM User | #1
storkfmny
New to the CF scene

 
Join Date: Mar 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
storkfmny is an unknown quantity at this point
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!
storkfmny is offline   Reply With Quote
Old 05-05-2012, 06:01 PM   PM User | #2
evo
waka Ionsurge


 
Join Date: Feb 2005
Location: United Kingdom
Posts: 882
Thanks: 5
Thanked 12 Times in 12 Posts
evo is an unknown quantity at this point
You need to make them into relative paths, in your case just use a filename.

In future keep everything organised!
evo is offline   Reply With Quote
Old 05-06-2012, 07:33 AM   PM User | #3
storkfmny
New to the CF scene

 
Join Date: Mar 2012
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
storkfmny is an unknown quantity at this point
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
storkfmny is offline   Reply With Quote
Old 05-06-2012, 12:20 PM   PM User | #4
evo
waka Ionsurge


 
Join Date: Feb 2005
Location: United Kingdom
Posts: 882
Thanks: 5
Thanked 12 Times in 12 Posts
evo is an unknown quantity at this point
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.
evo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:15 AM.


Advertisement
Log in to turn off these ads.