11 replies [Last post]
johlin1's picture
Offline
Joined: 11/19/2007
Juice: 23
Was this information Helpful?

I have a large file that I want to ftp to the File Product folder, as it is too large to upload it within Drupal. I've searched thru my folders but I can't figure out where I should put the file. If I am able to create my own downloads folder, where should it go and how do I associate it with UC? I'd rather put it in a folder that UC specifies.

Many thanks!

Sophia's picture
Offline
Joined: 11/17/2007
Juice: 58
In the root

I would suggest you put the file folder in the root, apart from the public_html folder... that way nobody can steal them from you!

What kind of hosting service do you use, and is it cpanel based?

johlin1's picture
Offline
Joined: 11/19/2007
Juice: 23
Cpanel

Thanks so much for your response, Sophia.

I'm hosted by site5 and I believe they have created their own Cpanel which is somewhat of a clone.

Can you tell me how to associate the folder with UC? I mean, how does one create a product and then associated with the file in the newly created folder?

Thanks and blessings.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Cpanel

admin/store/settings/products/edit/features

There should be a collapsible menu item for File Downloads settings. You should be using the uc_file.module (File Downloads) now in core, not the File Products contrib, as that is outdated.

Once you configured that, you create a new file download by going into your product's Edit screen and going to the Features tab. Add a new File Download feature and then start typing the filename of your downloadable file.

--
Help directly fund development: Donate via PayPal!

johlin1's picture
Offline
Joined: 11/19/2007
Juice: 23
Not working

I found the page you referred to and entered various parameters. But what I am unclear about is the directory. I created a directory called "downloadfiles" and for the files Path I tried a few variations: /downloadfiles/ and /home/downloadfiles/ and http://www.mysite.org/downloadfiles/ but it wont work and I get an error message "not a valid file or directory". I also tried putting in the downloadable file and including its name in the path.

Any ideas? Thanks very much.

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Not working

The directory has to be an absolute local path, in most Linux setups it's like this:

/var/www/vhosts/yourdomain.com/files

Make sure your files settings in Drupal config are public method and your public Apache user can read the folder you specify.

--
Help directly fund development: Donate via PayPal!

johlin1's picture
Offline
Joined: 11/19/2007
Juice: 23
Files Path

I'm just not getting it. I'm not sure how to figure out the absolute path, so I'm attaching a jpg of my ftp. I hate wasting your time, but I hope my ignorance my help someone else too!

AttachmentSize
screenshot_01.jpg 19.03 KB
torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Files Path

Can you get root access to your server? If not you might have some problems.

It looks like your folder, though, assuming that is the root - should be configured to just /downloadfiles

Leave the trailing slash off it. (Shouldn't matter, I don't think).

But it will matter if permissions are not set on that folder. Sometimes just creating a folder does not automatically mean the folder will inherit readable permissions. See if you can right-click on the folder and set Read permissions.

If you can't do that with your FTP client try using FileZilla. You should be able to find a mac version (I'm pretty sure one exists, anyhow).

--
Help directly fund development: Donate via PayPal!

johlin1's picture
Offline
Joined: 11/19/2007
Juice: 23
Working!

I got it working!!!

What I did was...I went to my control panel and viewed the index manager (this might not be available to everyone, as I use site5 hosting with their custom Cpanel). I clicked on the very top folder slash beside the "current folder" (that was the actual name of the folder). The slash, which was a clickable link, to me to another page which gave me different options for indexing - I didn't touch any of those options! Anyway, there I saw the path "home/****" - the "****" is my system username, for the server, ftp, etc. I added this before my "/downloadfiles" folder the create the absolute path in UC. So the whole path for me was /home/****/downloadfiles

I hope this helps others.

Thank you very much, Dalton and Sophia for your kind assistance!

Sophia's picture
Offline
Joined: 11/17/2007
Juice: 58
Glad to help I may need

Glad to help Smiling I may need yours some day, I know for a fact I need help LOL

Sophia's picture
Offline
Joined: 11/17/2007
Juice: 58
Re: Files Path

Either that, or /home/johlin1/files/

Whereas johlin1 is the login name you use for cpanel, sometimes that is the first 6 letters of your main domain such as (if you have an url called mybeautifulsite.com,) "mybeaut"

Look at your hosting company's help files what is their absolute path to their root, I host with Bluehost and their help is excellent.

I know it is confusing, took me quite a while to figure it out!

Sophia's picture
Offline
Joined: 11/17/2007
Juice: 58
Like this...

First I went to cpanel and up one level, so away from the public_html folder, then created the folder "files" right there in the root.

Then used an ftp program to upload my files there (or you can do it using cpanel, whichever you prefer)

Then in Drupal I went to

Home » Administer » Store administration » Configuration -> Product settings

There you can choose where you want your files, in my case this I put

/home/mycpanelloginname/files/

That's it! Your files automatically show up under

Home » Administer » Store administration » Products -> View file downloads

And you can associate them with your products.

I like Ubercart's approach, it's really easy!

Lol you beat me to it, Pizza!