hello.
i am trying to work with the ubercart file download module.
i have set the fille download directory to the same path where the CCK file fields are uploaded to.
so what i have is ubercart product node that i have added a cck file field to it.
once the user uploads the cck file field, it is still not available to be download once bought. since the ubercart file download should be told about what files are downloadable for this spesific download.
what i want to achieve, and haven't found the way yet, is auto referencing the cck file field as a downloadable file for that product ?
so once the user created the file field it will automatically created as a download ubercart file.
any help ?
By odedbobi on
Comments
I have same problem ..
any solution for this?
working on the same issue, i
working on the same issue, i think i will need to code a custom hook on the node save to fill out that value from the filefield
ubercart file download feature working with cck file field
Any news for this problem? Or can someone help me with the hook? Thx in advance
basically what i did was to
basically what i did was to go with filefield all the way and code everything i needed in views, so filefield handles the upload, i am protecting the upload folder with .htaccess redirecting every request from that folder through a custom hook_menu callback in my custom module
the function checks if the user has access (has bought the product or is owner/admin) and if it does, it calls the same functions that handle the private downloads in drupal, or returns an access denied page
the custom code i mentioned done in views, is just an user panel listing all available downloads via products bought
i think this was more flexible than ubercart private downloads (because of views integration
code &
Something like this (ive replaced certain tokens in ALL CAPS):
with .htaccess control over file directories, you also need to be careful about blocking the drupal core private files serving mechanism, something like this:
and i forgot to mention that filefield saved the files to a path like this in my files directory: "files/CONTENT-TYPE/NID/filename.ext".. this allowed me to get the nid from the path above.. im using the http://drupal.org/project/filefield_paths module for this
hope this helps..
P.S. please excuse the input filter messing up my api.drupal.org links.. ive left those on as pointers
Thx
Thank you for the reply , I will try this solution.
What is this string doing: ,
What is this string doing:
, 'file' => 'MYMODULE.MY-FILE-STORAGE-PATH-download.inc' ?
It seems I'm missing something here...
Files saved as - "files/ product/nid/smthing.mp3" and stay at that place.
everyone can download file form that folder... When do you make this files downloadable, and closed for non-buyers?
And how do you create list of buyed files in views? I've tryed to do such list, but only thing i created was list of files from CCK field with path "files/ product/nid/smthing.mp3" . If you can explain a little how it's going on.