Download restriction question
Tagged: download, restriction
- This topic has 19 replies, 3 voices, and was last updated 8 years ago by Carole Asselin.
-
AuthorPosts
-
2016-02-06 at 07:54 #636Carole AsselinParticipant
I have literally hundreds of links to downloadable documents (videos or written pdf). So far, all the videos were hosted on Amazon S3 and the pdf on my own server.
I am considering offering an “all access pass” but i want to limit the downloads to X per week/month. I know it is possible but from what i understand, the files have to be placed in a special folder in s2M. If i move them all (which is not that hard), it also means that i have to change ALL the links too, correct?
I also need to keep the videos on AmazonS3. Can i include them in the restrictions, somehow, while they are on Amazon?
Is there a simpler way than editing hundreds of links, manually, one by one?
2016-02-09 at 10:31 #644Krum CheshmedjievParticipantTo your last question: can use https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ WISELY!
2016-02-13 at 12:52 #645Carole AsselinParticipantI am looking at the download restrictions in the s2m dashboard. And i have various questions:
Since i have videos uploaded using Easy Video Suite to a specific bucket in Amazon S3, would i be able to use my existing bucket to deliver the downloadable version of the video files, while being “restricted” in s2M?
If i have some videos hosted on S3, and some documents in the s2M protected folder, would a restriction download take both sources into account to limit for the 10, or 20 downloads that i would set up?
2016-02-14 at 20:51 #646Carole AsselinParticipantKrum, that is a little scary to use. I am wondering if using this tool will only change the link in the DB or will it change it also on the pages?
2016-02-15 at 10:32 #647Krum CheshmedjievParticipantBoth will be changed, as WP posts and pages stay in DB.
2016-02-20 at 10:28 #648Carole AsselinParticipantAs i am slowly digging into these download restrictions, i am trying to figure out how the links will be changed to be ‘tracked’ by s2M, and i am at loss.
For example, the videos i have on Amazon s3, would have a download link that looks like this:
[video src="https://evs-hosted-151211b109649b.s3.amazonaws.com/inthenewswithpsp.mp4" /]What will it look like if i want to protect it (so it can be counted)?
For all the current written documents downloads, the links are currently like this:
http://scrapbookcampus.com/Webinars/InTheNewsWithPSP.zipFrom what i understand, i have to move those files into a “protected” folder in s2M, so i did this:
http://scrapbookcampus.com/wp-content/plugins/s2member-files/Webinars/InTheNewsWithPSP.zipHowever, it gives me a 404 error.
I tried this too:
[s2File download="InTheNewsWithPSP.zip"/]And i am getting this error message:
<Error>
NoSuchKey
<Message>The specified key does not exist.</Message>
<Key>InTheNewsWithPSP.zip</Key>
<RequestId>01E76E59A6AA9FF3</RequestId>
<HostId>
mH5k5nAV34Y3mo5vTniGMOdF3qW9Vd3JDeRhbjI7nXo4x4zDSjCAJkHgJ08byzhyV3fgeko6OfA=
</HostId>
</Error>What key is this referring to? What am i doing wrong?
I have only started moving/copying files into that particular s2M folder, so i can plan on changing the actual link when i can figure out what they are supposed to look like, but i likely didn’t get it right yet.
Thanks.
- This reply was modified 8 years ago by Carole Asselin.
2016-02-20 at 10:47 #650Krum CheshmedjievParticipantThe download link should be http://scrapbookcampus.com/?s2member_file_download=Webinars/InTheNewsWithPSP.zip, check in Dashboard -> s2Members -> Download options -> Basic download restrictions.
2016-02-20 at 10:50 #651Carole AsselinParticipantOk i can’t seem to edit that post so i’ll update here.
It looks like the filename used for the writtendocument, saved in the protected folder of s2M has the same name (with different extension) than the video file uploaded on AmazonS3. I have set up (or tried to) the key for AmazonS3 video files.
Currently, the video file can be downloaded using this link:
[video src="https://evs-hosted-151211b109649b.s3.amazonaws.com/inthenewswithpsp.mp4" /]I am not sure it is “protected” or tracked in the downloads, so i am not sure what i am missing there either.
2016-02-20 at 10:55 #652Carole AsselinParticipantThe download link should be http://scrapbookcampus.com/?s2member_file_download=Webinars/InTheNewsWithPSP.zip, check in Dashboard -> s2Members -> Download options -> Basic download restrictions.
That is still giving me an error.
2016-02-20 at 15:07 #654Cristián LávaqueKeymasterIf you set up the s2 integration with AWS, then by default s2 will look for the protected files in the Amazon bucket you set, not the /plugins/s2member-files/ directory. You can use both, though, AWS will be the default, but you can specify the local directory in the link. WP Admin -> s2Member -> Download -> Shortcode Attributes -> storage
Work with that a bit to figure it out, and see if you have new questions then. 🙂
2016-02-20 at 15:09 #655Cristián LávaqueKeymasterDid you watch this video?
2016-02-20 at 16:32 #656Carole AsselinParticipantOk, after removing all the setup for amazonS3 “protection”, i got all the files in the “protected folder”, and the link works (thanks Krum), and the shortcode too.
Now, i configured the AmazonS3 and i can include the link to be protected.
Great!!! So, at the base, it works.
Now, i have another odd set up to account for. If i want to have one document (video or file) to be available EITHER as with a “buy now” product, with no download limitation (since it would be a purchased product) OR as part of an all access pass (where the download limitation IS to be tracked) how would i go about it?
2016-02-20 at 17:14 #657Carole AsselinParticipantOK here is my hypothetical setup for a link to a particular tutorial based on two options:
option 1 – the user has purchase the dripped option (which is currently done with Krum’s hack)
option 2 – the user has a DIAMOND ccap which is an all-access and does not rely on the dripped option but is subject to download limitHere is the possible code:
[s2If kc_drip_element(3_weeks)]<a href="http://scrapbookcampus.com/element-creation-index/square-paper/">Square paper</a>[/s2If] [s2If current_user_can(access_s2member_ccap_diamond)]<a href="http://scrapbookcampus.com/?s2member_file_download=Element/square-paper/">Square paper</a>[/s2If]
Considering that the same download might or might not need to be tracked the same way (maybe by ccap instead of by level) is there a way to limit based on ccaps INSTEAD of level?
- This reply was modified 8 years ago by Carole Asselin. Reason: code didn't stay as code
2016-02-20 at 17:21 #658Cristián LávaqueKeymasterRemember that if you’re using the S3 integration now, then the local s2member-files directory won’t be used unless you specify it using the storage attribute. WP Admin -> s2Member -> Download -> Shortcode Attributes -> storage
So you may want to have a copy of your full s2member-files directory contents in the S3 bucket for s2Member to avoid any broken links.
If you want to have an all-access, it’s not a problem when using files protected with levels, since giving a higher level will include access to the lower ones. WP Admin -> s2Member -> Download -> Capability & Level files
There isn’t an equivalent for ccaps, though. If a file is protected with a ccap, then the user will need that specific ccap to access it. To work around that, you’d either need a hack, or make another copy of the file for that higher access ccap.
2016-02-20 at 17:23 #659Cristián LávaqueKeymasterConsidering that the same download might or might not need to be tracked the same way (maybe by ccap instead of by level) is there a way to limit based on ccaps INSTEAD of level?
Tracking limits are based on level. But well, if all paid users have the same level, then that limit would apply. I’m pretty sure that files protected with a ccap still count towards the limit, but you can test it (remember to use a regular user account).
- This reply was modified 8 years ago by Cristián Lávaque.
2016-02-20 at 17:35 #662Carole AsselinParticipantNow that you say that, I don’t think ccap downloads are tracked, since tracking limits are based on level. But well, if all paid users have the same level, then that limit would apply. I’m pretty sure that files protected with a ccap still count towards the limit, but you can test it (remember to user s regular user account).
That might be a little annoyance then: i have some customers who bought the dripped course, and are just starting.Their downloads are straightforward If i also offer an all access pass and hide the same downloads behind that protected wall, to track the downloads, those “dripped” customers will always see the popup about the download limit which is totally not for them. It won’t block anything as the dripped content will include fewer files than the maximum download limit, but still would be annoying.
Remember that if you’re using the S3 integration now, then the local s2member-files directory won’t be used unless you specify it using the storage attribute. WP Admin -> s2Member -> Download -> Shortcode Attributes -> storage
My head is spinning! I’d have 500+ links to change and i am terrified of using the program Krum suggested above in case i need to change something and have to redo it.
2016-02-20 at 17:42 #663Cristián LávaqueKeymasterYeah, it’s scary every time a big change like that is done… I’d think about it carefully too, and test in a copy of the site several times before going ahead and trying the live site, only after backing it up first.
When integrating with S3, I guess it was assumed that every protected file would be there and the local storage would be the exception. Why did you decide to integrate with S3 and why would you not use it for all protected files?
About removing the count for certain users, you can probably give them a higher level than the regular user, and remove download limits to that level. Would that work?
2016-02-20 at 17:50 #664Carole AsselinParticipantWhen integrating with S3, I guess it was assumed that every protected file would be there and the local storage would be the exception. Why did you decide to integrate with S3 and why would you not use it for all protected files?
I never actually made a conscious decision. All the written files, pdf and zip have always been stored on my site, but when i have 60 minutes video files, i have been using Easy Video Suite, which integrates with AmazonS3 and having it out of the site, it would not affect my data usage on my shared hosting. So that is how things are divided.
Uploading files using Filezilla is so much simpler than AmazonS3 for those many small files.
About removing the count for certain users, you can probably give them a higher level than the regular user, and remove download limits to that level. Would that work?
Not sure it would work as nothing is based on levels on my site. I only have level 0 (free) and level 1 (paid) but i have no content that is conditional to a level.
2016-02-20 at 18:22 #665Cristián LávaqueKeymasterIt doesn’t matter if you’re not conditioning content to that level, just use the higher level for those that get the unlimited downloads access. Still protect with the ccap, but the downloads would be unlimited.
I know that’s not as clean and straightforward as it should be, but you’re pushing the limits of the current s2. The original restriction was only levels, and everything worked with them, but then ccaps were added, only not fully integrated with everything.
2016-02-20 at 18:32 #666Carole AsselinParticipantbut you’re pushing the limits of the current s2.
Always have, apparently!
I’ll test further and report. -
AuthorPosts
- You must be logged in to reply to this topic.