After I create an order and click on the actual file; 'system/files/' is displayed in the url file path so the file cannot be found (ig httpzzzz://mysite/system/files/commerce_support_files/video.mp4 )
I'm not sure where the systems/files is coming from ?
Its not in the system media files configuration or commerce file product type - files directory setting from what I am seeing.

Comments

rfay’s picture

system/files is the Drupal "private" filesystem. It's the result of private://somefile.ext

bradhawkins’s picture

Also, if you're getting an 'Access Denied' error, then you might have a permissions problem on the 'private files' folder. Make sure it is readable by www and in my experience symlinks aren't functioning properly in drupal 7 (not yet).

toby53’s picture

Hi,

The 'system/files' is still being generated in the file link url when clicking on a file name (via views).
In views when you select the "Commerce File License: Licensed file" field it contains the 'system/files' in the preview too.

We just updated the drupal 7 core and installed the commerce file 7.x-1.x-dev.
The admin/config/media/file-system Default download method is set to "Public local files served by the webserver". The files are being uploaded to the correct directory as configured.

Any suggestions ?

bradhawkins’s picture

Someone please correct me if I'm wrong but, I don't think you can use the public file system for Commerce File. As far as I know it will always use the Private system. Thus it will always have the 'system/files' address for links.

What is it that you're trying to accomplish? Do you want the files to be accessible without purchase?

toby53’s picture

We reset the configs back to the private file system.
Everything is working fine but:
The views "Commerce File License: Licensed file" field it contains the 'system/files' in the url ?
Any suggestions are very much appreciated !

recrit’s picture

Status: Active » Needs review

Commerce File intentionally cannot be set up with a public file system. Drupal core's private system uses the path 'system/files' to direct the file request to drupal since files in the private directory are not directly accessible. If you want it to be something else, you might be able to do a hook_menu_alter() to accomplish it.

recrit’s picture

Status: Needs review » Postponed (maintainer needs more info)

meant to change status to needs more info

toby53’s picture

thanks
Here are more details

on the admin/config/media/file-system:
set Private file system path to: /var/private ( on ubuntu 10.04, its out of web root that is /var/www )
Set Default download method to: Private local files served by Drupal.

You can do everything else normally: add a new file product, upload the product file (to the right directory as described above on the indicated on the Private file system path, add the file product display to my cart, checkout, order created ...

However when the The views "Commerce File License: Licensed file" field it contains the 'system/files' in the url ? When I click on the file I get an "access denied message".

( As a workaround for a website demo I created a mywebroot/system/files dir, reconfigured and disabled the .htaccess - it works but I feel very nervous doing something like this !)

recrit’s picture

you should not have to do that.... here's some clarification:
system/files is a virtual path controlled by drupal, so a file located at /var/private/x.jpg would be http://domain.com/system/files/x.jpg

that said, I noticed that the issue is marked beta1... try upgrading to the latest dev version and try again... The beta1 is not supported anymore.

after upgrading and testing, provide some info if you still have problems:
- is the order marked as Completed?
- are you logged in as the user who purchased the file?
- you might have some old licenses left over from previous testing for that file id, delete those and re-test

tvilms’s picture

I was having similar problems. File downloads were not working. I was getting the similar "Access Denied" message.

I explored this issue and another one (http://drupal.org/node/1259328). Good news... my problems were solved after upgrading to the latest dev commit 7.x-1.x-dev, clearing cache, and then finally reverting the rules that were showing error messages.

Commerce File downloads are working for me now.

Thanks all!

recrit’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

see http://drupal.org/node/1356212 for setup details.. closing this issue