Home > Industrial Experience > Problem with image path

Problem with image path

I sent an email to my group today. The email depicts the current problem that I have with the CMS. The email is posted below:

Sent on 4:09PM

This is the problem that I’ve been having for the path.

You see, now I dont want to store the path of the file in the Images table. I just want to store image name. But to make the file searchable from the website, I added a new column called IM_Type. In the website, we would have an algorithm that would tell the program where the file is based on the IM_Type . Let me give you an example here.

If IM_Type == “Product”
Then the path is “ImagesProducts” + fileName

or

If IM_Type == “Category”
Then the path is “ImagesCategories” + fileName

But there’s a problem with that you see. In the internet, the files are stored using forward-slash (i.e. “/”), but on localhost (which is our machines), files are stored using back-slash (i.e. “”). Maybe I can change it using hard code before we upload to the internet, but in the mean time while we’re developing on our machines, this is going to be a problem.

Before that I was using Server.MapPath for the path. But since now the If statement above is string, the Server.MapPath wouldn’t resolve it properly. (This is a bit confusing here. hehe).

Anyway, just want to let Steven and rest know what’s happening in the Images section. It’s the most difficult part of the system. Oh yah, remind me that I want to talk to you guys about the Orders page tomorrow too.

Categories: Industrial Experience
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: