Download restriction: can't seem to find the correct way to link

I have a lot of content that was never specifically protected other than by the links being on restricted pages, however, i am currently looking into having a type of all-access pass and to prevent someone from registering for one month and downloading hundreds of files, i want to use the download restrictions. But to do that, it looks like i will have to change many many links.

The problem i am currently facing is figuring out what those links should look like as i keep getting errors. So here is where i am at.

I have one CURRENT link that is
http : // scrapbookcampus.com/ Webinars/ InTheNewsWithPSP.zip
This file is not in a protected folder, but accessible only to those with access to that page.
(the spaces were added because i had too many links to allow this post)

To plan for the tracking and restrictions, i moved the file in /wp-content/plugins/s2member-files (and i made a subfolder to help with categorizing the various files) so the same file is now in here:

Now, if i use this link:


I get an error like this one:

NoSuchKey
The specified key does not exist.
InTheNewsWithPSP.zip
01E76E59A6AA9FF3

mH5k5nAV34Y3mo5vTniGMOdF3qW9Vd3JDeRhbjI7nXo4x4zDSjCAJkHgJ08byzhyV3fgeko6OfA=

Somehow, this seems to “mix up” with the AmazonS3 setting i changed to also protect some video files from being downloaded in batch. I have to keep those files on AS3 because of the size. But the link above was for a file on my server, and not on AmazonS3, so i don’t understand the error, why it is referring to Amazon or how i am supposed to have the link to get.

So, any way to get help in figuring out the correct links i should use to have them all protected?
(the AmazonS3 download restriction might be another thread)

Thanks.

Anybody can help with this code?

@Cassel: Carole, I think the issue is that, as soon as you configure s2Member to look for downloads at Amazon S3, then ALL download links are treated as linking to somewhere on Amazon S3. Without custom coding, I don’t think it’s possible to have some files in local storage and some on S3.

Hi Tim,

Well, this might be a working solution to put everything on Amazon BUT, even if i did put the file in there, i am still getting the exact same error. So that is not really solving anything.

What else might i be doing wrong?

Carole

Carole, the message talks of a “key”. So if you get the same message even if the file is actually on S3, then that makes me wonder whether you have set a key to be required for downloading that file. If you have, the problem is that the link you have specified does not include that key.

Just to follow up, in the section for the attributes, it states this:

storage="" Defaults to [empty]. If storage=“local|s3|cf”, s2Member will serve the file from a specific source location, based on the value of this Shortcode Attribute. For example, if you’ve configured Amazon S3 and/or CloudFront; but, there are a few files that you want to upload locally to the /s2member-files/ directory; you can force s2Member to serve a file from local storage by setting storage=“local” explicitly.

Maybe i am understanding wrong, but it looks like it might be possible to have two different locations for files. However, this seems to only be for shortcodes, which makes me wonder how i can LINK something to that file (like an image or even a text link).
Carole

Also, the “key” error only appears if i click on the link as an administrator, but if i click on it as a member with the correct level, i am redirected to the home page now.
Odd.

Just to follow up, in the section for the attributes, it states this:

a… storage="" Defaults to [empty]. If storage=“local|s3|cf”, s2Member will serve the file from a specific source location, based on the value of this Shortcode Attribute. For example, if you’ve configured Amazon S3 and/or CloudFront; but, there are a few files that you want to upload locally to the /s2member-files/ directory; you can force s2Member to serve a file from local storage by setting storage=“local” explicitly.

Maybe i am understanding wrong, but it looks like it might be possible to have two different locations for files. However, this seems to only be for shortcodes, which makes me wonder how i can LINK something to that file (like an image or even a text link).
Carole