Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Path to the files folder

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-17-2010, 06:59 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Path to the files folder

Hi All,

I'm trying to upload some images into the 'files' section of my site, then access them via a static page using the WYSIWYG editor. I've tried so many different paths to the folder to try and access the image but nothing works. I have my xcart install in a directory called "creamery" so I thought it would simply be this:

/creamery/files/image.jpg

No good. Anyone know how to include an image on a static page that you've uploaded into the files section?
__________________
v 4.1.11, v 4.2
Reply With Quote
  #2  
Old 02-17-2010, 07:18 AM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Re: Path to the files folder

You have the correct path, but keep in mind that by default the files folder has an .htaccess file with the following:
Deny from all

Normally I leave this in place, and I create a subcategory and add my images or whatever I upload into the subcategory then add a .htaccess file to that subcategory with the simple line:
Allow from all

This retains that security in the files section in case there are future parts that you want to remain protected. Or you could just delete that .htaccess and be done with it, all up to you.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #3  
Old 02-17-2010, 07:35 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Re: Path to the files folder

Thanks for the tip jdiehl. I've deleted the .htaccess file from that folder and the path is still no good. So weird...
__________________
v 4.1.11, v 4.2
Reply With Quote
  #4  
Old 02-17-2010, 07:53 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,201
 

Default Re: Path to the files folder

If you are trying to access them from within xcart site then the path will be "files/image.jpg". Also make sure permissions on the directory files allows you to read from there
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 02-17-2010, 07:56 AM
 
jdiehl jdiehl is offline
 

eXpert
  
Join Date: Dec 2003
Location: Kansas City, MO
Posts: 270
 

Default Re: Path to the files folder

You can also test access to the file just by going to:

http://domain.com/creamery/files/image.jpg

Obviously use your own domain name. If that works then you must be entering the path into the static page wrong some how. You might need to just use the full path domain included if that's easier.
__________________
Jason Diehl

Finding Cures for Your Online Headaches: http://www.internetmedicineman.com/
Reply With Quote
  #6  
Old 02-17-2010, 08:27 AM
 
presson83 presson83 is offline
 

Senior Member
  
Join Date: Sep 2008
Posts: 143
 

Default Re: Path to the files folder

Hey Guys,

Figured it out. I'm currently not "live" yet and I'm using a developemtn server that has a "/~username" extension before the folder name. I just needed to add that in and it's all good now! Thanks for the tips!
__________________
v 4.1.11, v 4.2
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 10:29 AM.

   

 
X-Cart forums © 2001-2020