Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Problem Uploading Images

Apr 5, 2007 2:23AM PDT

first off, please know that this post isn't a back-handed attempt to promote my site. i'm simply at the "up to here" stage with my host's support and don't know where else to go ... so i naturally thought i would turn to where the REAL knowledge is!


i'm attempting to upload images to a SUBdirectory of mine, however, it's not working. i've used 3 FTP apps (SmartFTP, WS_FTP, FileZilla) and ensure that the transfer mode is good (binary or auto) and can't for the life of me figure this out ....


i've created 2 test pages to view the image properties:

www.completeonlinemarketer.com/test_upload.htm

www.usanyou.com/test_upload.htm


the problem can be seen when viewing the image properties of www.usanyou.com/test_upload.htm" and seeing that it is creating an arbitrary SUB-directory called, "Complete_Online_Marketer."

"http://usanyou.com/Complete_Online_Marketer/images/5TrafficTactics.jpg"


"www.completeonlinemarketer.com" = my primary directory

"www.usanyou.com" = SUB-directory (add-on) of completeonlinemarketer


for the life of me, i can't figure out WHY this erroneous subdirectory is being created. i have been painstakingly uploading the proper images from the proper directory under completeonlinemarketer/public_html/usanyou/Images and the properties from my web editor indicate that this is the uploaded URL.

however, IE shows this erroneous path and i can't even find the subdirectory Complete_Online_Marketer anywhere from the root down --- it definitely isn't anywhere in my subdirectory, usanyou.com!

i can't find "Complete_Online_Marketer" anywhere !!


all 3 ftp programs show a successful transfer. in fact, i used 3 different ftp programs in case i mistakenly set some property and named this "Complete_Online_Marketer" directory somewhere in my default ftp program ... but i definitely didn't use this name in any part of the other 2 FTP setups (and really can't find this name anywhere in the 3rd anyway).


BTW, i am able to upload any other page from usanyou.com .... except for ANY images.


PLEASE Someone ... Anyone --- what gives?


Thx in advance for your troublshooting help !! ...


PS
If it helps, i am on a PC using Windows XP.

Discussion is locked

- Collapse -
Notice that case?
Apr 5, 2007 2:46AM PDT

5TrafficTactics.jpg

Time and time again, web crafters run into case issues of the filenames for images and more. While I do encounter some that dig in their heels and exclaim "it should work" I've learned to stick with all lower case names and if possible 8.3 names of all files if possible.

Just sharing.

Bob

- Collapse -
I'm confused...
Apr 5, 2007 2:51AM PDT

Is the issue in the HTML for the page or the actual files existing on the server?

My guess is that if you are using a program to create the web pages instead of hand coding them that it is sticking in the directory as that is where it is on your local copy in a sense. What program are you using to create the pages?

Regards,
JB

- Collapse -
Problem Uploading Images - con't
Apr 5, 2007 3:05AM PDT

hi guys,

THX very much for your time!!


1. i have learned as well to check for upr/lwr case errors and see nothing unusual. esp since i copy and pasted the image insertion link for both test pages (but changed the domain name).

that said, i do see that the actual image directory begins with a capital "I" but the IE url shows a lower case "i" .. i wouldn't know how to change that since i created, inserted and uploaded from the file that is a capital "I."


2. i'm using FrontPage to create the pages. i just don't see how this could be the origin of the problem since everything else i do seems ok -- that is, everything from the primary directory gets uploaded ok, as does the text pages for all my subdirectories.

and i have never identified any directory name with underscores in my editor.


please don't give up on me ... i'd love to know what else you have ...


thx much,
vicky

- Collapse -
I see you passed on the advice.
Apr 5, 2007 3:10AM PDT

Maybe someone will write it better than me why case matters and why FrontPage continues to cause this issue.

Good luck with that.

Bob

- Collapse -
case advice
Apr 5, 2007 3:15AM PDT

bob,

guess i'm missing something -- i don't see any erroneous cases, except the one i mentioned. but ... not sure if that is a "user" thing since i made a point of ensuring that there were no discrepencies. i don't know why the "Image" folder wouldn't reflect the proper case that it was uploaded from.

are you saying that you noticed some other discrepency?

- Collapse -
It's a repeating issue.
Apr 5, 2007 3:20AM PDT

I only have to ftp to the site and ls or dir the files. Then view the HTML source to check if it's ok as to case and path. This is just one step after "my first web site" so I leave it to you to check that.

I'm going to just note the usual gaffe and how I avoid it. But you seem to want to use mixed case filenames which is going to give some sites this issue.

Your choice here. And again you seem to be passing up on simple advice that could avoid the issue. I can see why and have heard it before since many will use FrontPage and it usually works but when it doesn't we dive in and check the HTML and more. Have you?

Bob

- Collapse -
daft gaffe
Apr 5, 2007 3:31AM PDT

ok, we're obviously speaking different languages. i admit, my level of gaffe is inferior to yours (altho i'm enjoying reading about it -- so far), but i guess i'm a "cartoon" kind of thinker. guess i need obvious pictures.

first of all, i don't know what your ftp-ing. and it would help if you could tell me which pages you were viewing source for. test_upload.htm? other?

i'd also like the benefit of the doubt that i actually have gone back and checked the code - since this is a growing enigma for me. in fact, it's quite possible that i've looked so often that i'm blind to something obvious.

so-o-o ... what the heck do you see that is wrong .. or are you just messing with me?


just sharing. Happy
vicky

- Collapse -
Which is why...
Apr 5, 2007 3:36AM PDT

My advice is to stick with lower case names and even better the old 8.3 names until you come up to speed on reading the HTML code and checking the web site's directories.

This is just my advice here to help avoid the issue and you may use it or not.

FrontPage sadly removes new website builders from seeing this but one can catch up quickly.

Bob

- Collapse -
thx
Apr 5, 2007 3:47AM PDT

ok then -- thx for your time.

cheers.

- Collapse -
Well...
Apr 5, 2007 5:40AM PDT

My initial question remains in the sense of what is the issue you are trying to resolve:

1) The existence of the files on the server.

2) The broken link on the second link? If it is this then I'd highly suggest manually changing the link as I suspect when you made the page in FrontPage it copied a local relative path to the file is rather than rely on you to have this properly set. Additionally, how is the subdirectory expected to go back to the root and then off to the images folder? If you think about the directory tree for the second link you give there isn't a path to the images folder and it may be that on the server that path doesn't resolve itself though I'd also note that what the server is running isn't disclosed here, e.g. what operating system(Windows, Linux, UNIX, wakka wakka) and web server software(IIS, Apache, nothing).

I'm not giving up but there is something to be said for understanding what you want to fix and whether I need a Flux Time capacitor to do it...

Regards,
JB

- Collapse -
Are you...
Apr 5, 2007 3:22PM PDT

publishing your images and pages with FrontPage?

~Sovereign

- Collapse -
Flux Time Capacitor ...?
Apr 6, 2007 5:23AM PDT

OBVIOUSLY ... i can't hide the fact that i don't (didn't) have a clue what i was doing.

having rec'd the "gaffe lecture" from Bob, i've gone back with my tail between my legs and see that the code IS the problem (guess that makes ME the problem as well).

i see now that SUBdirectories don't behave as i expected them to and no matter how i insert my graphics, there is some "erroneous code" (the local relative paths you mention) that gets created because I've been too oblivious to force the urls by coding them myself.

who knew ..?

that said, i'm still unable to upload from an "images" folder in my SUBdirectory and have to use the "images" folder from my primary directory. i'm still a little grey on that but as in the code problem, i'm sure it's obvious ... i just need to think about it more.

i don't think i even want to know why it matters what OS (Linux) & server software (Apache 1.3.37) i'm using with my XP PC...


update:
after manually coding the url paths in FrontPage, ALL my images are uploading as expected. however, as mentioned, i guess i'm not clear on why the "image" folders can't work in their own directories so i'm simply using one large image directory from my primary (root?) directory.

i've also discovered that, although i THOROUGHLY appreciate the advice, it takes me at least 3 times re-reading your replies before i can decide what you guys are talking about (plz, no comment)! just the smallest phrases from another language ("geek"/techno -- no offence) can throw me off and make me think my problem is much bigger than it really is.

... so much to learn!!

THANK YOU all VERY MUCH(incl Bob) for taking the time to force me to give my head a shake. i appreciate your time!

- Collapse -
I apologise.
Apr 6, 2007 5:37AM PDT

I know the issue with naming with mixed case and since it wipes out many I had to comment about it. It's a lesson learned that I pass along.

The idea of looking at the HTML code might seem strange at first but it NAILS the issue almost everytime.

On the upside I'm reading that you are making progress.

Bob

- Collapse -
hi Bob
Apr 6, 2007 6:30AM PDT

i thought i was going to have the last say ... Happy

no need for apologies -- i don't want to come off THAT sensitive! i also hope i didn't put either of you off by using the "geek" word (i should be so lucky!).

anyway, thx again for playing -- MUCH appreciated!!!

- Collapse -
The secret of paths....
Apr 6, 2007 7:49AM PDT

It is becoming clearer what is going on here and hopefully this will help elaborate on the issue you have:

There are 2 types of URLs in a page generally speaking: Absolute and relative. The latter is where you don't specify the entire path and thus the current folder is where the server will try to navigate to find the file. So if you do a src="images/myfolder/myfile.jpg" this suggests in the current folder that there is an images subfolder, with a subfolder called myfolder, etc. whereas if you do a src="http://mysite.com/images/myfolger/myfile.jpg" this specifies exactly where and doesn't involve figuring out where the file is relative to the current folder.

As was said before, I'd suggest hand-coding the URLs unless you use some code-generation tool.

As for uploading images from a subdirectory to the server, this should be rather easy to resolve as most FTP or other programs that transfer the file should move it. One reason for asking what the server uses is that if it is a different O/S are you looking for the file on the server by logging onto the server or by browsing the web site on the server? There is a difference here as if the files aren't there then you may have firewall issues or something else blocking the transfer which is totally different from the coding issue on the page.

If you do have questions about what is meant in some post just ask them as I've been managing web sites and doing web development for over 9 years now so while I may try to keep things not too technical for some it can be that they aren't familiar with some terms I may use or know that I mean a specific definition for the term.

Regards,
JB

PS - Good luck on getting your site up and running.

- Collapse -
curious about paths ..
Apr 6, 2007 9:55AM PDT

thx again for your reply, JB. One last question I hope) ...

it never occurred to me til i read your last post, but, what is the common practice for storing images in server directories? not giving it any thought before, i just organize my folders like:

primary directory
images
sub-directory-1 / images
sub-directory-2 / images
etc

however, i read from you that you like to organize like:

primary directory
images / sub-directory-1
/ sub-directory-2
/ etc

your way seems much more streamlined ... and will this ensure that "relative" image inserts will automatically code correctly?
(of course, i've learned to dbl-chk anyway!)


i really hate to confess this last bit, but (anonymity being what it is ...)

Quote:
".. are you looking for the file on the server by logging onto the server or by browsing the web site on the server? There is a difference here as if the files aren't there then you may have firewall issues or something else blocking the transfer which is totally different from the coding issue on the page."

> at the risk of coming off looking like an idiot, i don't know what you mean. when i use an ftp program to upload my local files to my "remote location" .. am i "browsing the web site on the server" or did i "log onto the server" ..?

guess it's ok if you're shaking your head, since i can't see you anyway. Happy

i will assume it's not a firewall thing since i haven't had uploading issues with my primary directory.

btw, is my "primary" directory the same as my "root" directory (always thought the "root" was where my primary came from.)

thx again,
v

- Collapse -
Several solutions....
Apr 6, 2007 2:46PM PDT

Some places like Drugstore.com will use other companies to store their images via services provided by companies like Akamai while others may just have one central images folder to keep things consistent. So to that end, what I'd suggest is having one central copy of the images and all the pages in the site reference the image with an absolute full path rather than a relative one, just to keep things simple which is good.

The key though is relative paths don't get resolved that way though there are ways on the server to set up virtual directories so that the web server can make a path like "sub-directory-1/images" point at "images" if you want to get into that management end of things. The main point for having only one copy is that if you have multiple copies of the same file and want to change that graphic then you have to find all the places where the copies are stored, e.g. if a company changes its name or logo or slogan, etc.

Let me explain what I mean by each type of browsing as I don't know which type your FTP is using and thus my rationale for asking:

1) The logging onto the server. This is the case where you are on the server as a user and not looking through the web server software at all. Though it is a Linux machine there should be some way of viewing the information in directories on that server to see what is there and isn't there. There are features in some operating systems like "Remote Desktop" that can let you virtually log onto the machine or you could log into a shell program to get into the server to view its files. The main point here is that you don't involve Apache in anything in this view.

2) Browsing the site. In this case, you could make http requests to the server where if you allow directory browsing you can get the server to list the contents of a folder. Here you are going through Apache and whatever translations it does between the operating system's file structure and the web site structure.

Root and primary are interchangeable terms for the highest up that you can go in the directory structure, yes.

Regards,
JB

- Collapse -
thx for that!
Apr 7, 2007 6:27AM PDT

once again, thx for the explanations. just when i think i've learned something, something else comes along to make me question what i know.

that said, i appreciate your time -- you're a good sport!


think i will go study now...


cheers,
v Happy