Use a second Base Directory? Like on the main File Away settings page. You have 5 base directories you can set. Set Base 2 as /var/www/html/google/wp-content/uploads then in your [fileup] and [fileaway] shortcodes add base=2 for the ones where you want dirs outsides myfiles.
Sir,
I can add multiple base directories. But website has more than 5 pages where I would add base directories. What should be done in case where more than 5 directories are needed ?
Thanks
That’s what the sub attribute is for.
You only need one base directory really.
It’s not hard if you think about it.
Make this your base 1 directory:
/var/www/html/google/wp-content/uploads
Then your sub attribute in the shortcodes can carry on from there, as needed:
[fileaway sub=”myfiles/Nexus 5″]
[fileaway sub=”somedirectory/datasheets”]
Whatever. The combinations are endless. Just set your base directory to be the main parent directory that all your subfolders will be in.
Or you can set up to five base directories, but you really don’t need to do so.
Agree on your above point. But if I use below code
[fileaway sub="myfiles/Nexus 5"]
[fileaway sub="somedirectory/datasheets"]
user who is supposed to have access to only datasheets directory can also see Nexus 5 directory as all the directories will be listed together. Even if I set up as you instructed, if a user has value product_no = Nexus 5, he will be able to see Nexus 5 directory as well as Nexus 5 folder which is inside datasheets directory.
How do I overcome this situation ?
Those were not exhaustive examples. I don’t know what you’re trying to accomplish but either you can make it work with File Away or you can’t. Sit back and draw a diagram of what you’re trying to do. File Away can probably do it if you plan your directory structure smartly enough. There are lots of options, and I’ve provided extensive tutorials. There’s nothing I can tell you here that I haven’t already written into the tutorials.
Current Base Dir 1 – wp-content/uploads/eragon-files
Page A shortcode to restrict access based on product_no selection by user while registration
[fileaway showto="administrator,google" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet"
heading="Software Package" hcolor="silver" directories="on" manager="on"]
[fileup sub="Eragon 600" showto="administrator" makedir="true"]
[fileup sub="Eragon 410" showto="administrator" makedir="true"]
[fileaway sub="fa-usermeta(product_no)" showto="normal" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date"
theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on"]
google-files
Nexus 5
Some files
Nexus 6
Some files
Here if user has selected product_no Nexus 5, then it can access only Nexus 5 directory and its files
Page B existing shortcode where two files are listed for Nexus 5 and Nexus 6 but need to show based on product_no selection
<strong>Nexus 6 Datasheets</strong>
<a href="http://google.com/wp-content/uploads/Nexus_6.pdf">Download</a>
<strong>Nexus 5 Datasheets</strong>
<a href="http://google.com/wp-content/uploads/Nexus_5.pdf">Download</a>
The directory structure for above could be something like below
documents
Datasheets
Nexus 5
Some files
Nexus 6
Some more files
User Guide
Nexus 5
Some files
Nexus 6
Some more files
When user click on Datasheets Page, he can only access those directory based on product_no selection. Same goes if he selects User Guide page.
How do I achieve above ?
You would have to use two shortcodes for your two different nexus 5 directories, or change your directory structure to work with file away. File Away doesn’t do what you’re trying to do.
Could you please guide on either workarounds ? What shortcode should I include or how do I modify the directory structure ?
Thanks!
documents
Nexus 5
Datasheets
Some files
User Guide
Some more files
Nexus 6
Datasheets
Some files
User Guide
Some more files
[fileaway directories=true sub=”fa-usermeta(product_no)”]
Page B shortcode used
[fileaway showto="administrator,google" type="table" paginate="true" pagesize="10" searchlabel="Search" datelabel="Date" theme="silver-bullet" heading="Software Package" hcolor="silver" directories="on" manager="on"]
[fileaway directories=true sub="fa-usermeta(product_no)" showto="normal"]
Directory Structure at wp-content/uploads/
documents
Nexus 5
Datasheets
Some files
User Guide
Some more files
Nexus 6
Datasheets
Some files
User Guide
Some more files
Accessing Datasheets Page, directories under eragon-files/ are viewed and not under documents.If I change base dir to wp-content/uploads/, it shows all the folders
Am I still missing something here ?
Every time you comment, you give me a different set of directory names from the last time. I cannot make any sense of your issue. At this point you may need to hire somebody to help you with this issue.