Page 1 of 1

File Download Not Redirecting

PostPosted: September 2nd, 2010, 8:41 am
by instructor1
Hello, I just began using file download options (restrictions) for my site. It seems to work well for all levels except when I am not logged in and try to download a protected file it does not redirect. I get: "404: Sorry, file not found. Please contact Support for assistance." I know that the s2member plugin knows where the file is, because it the download prompt pops up when I am logged in as a user. So....

What am I doing wrong? Is there an additional setting for non-logged in users?

I am NOT running BuddyPress.

Thanks
Instructor

Re: File Download Not Redirecting

PostPosted: September 2nd, 2010, 8:43 am
by instructor1
Oh yeah... I am running 3.2.4.

Re: File Download Not Redirecting

PostPosted: September 2nd, 2010, 8:51 am
by instructor
and on WordPress

Re: File Download Not Redirecting

PostPosted: September 2nd, 2010, 2:08 pm
by Jason Caldwell
Hi there. Thanks for reporting this.
I get: "404: Sorry, file not found. Please contact Support for assistance." I know that the s2member plugin knows where the file is, because it the download prompt pops up when I am logged in as a user. So....

The "prompt" is not an indication that the file was found, as this is handled via JavaScript. So my guess is that your Download Link is incorrectly formatted, or the protected file is not being found in the anticipated location.

Possible solution:

Please check to make sure that you uploaded your protected file to:
/plugins/s2member-files/some-file.zip

Your Download Link should look like this:
Code: Select all
http://yoursite.com/?s2member_file_download=some-file.zip

Also, before testing; please make sure that you've configured s2Member's Basic Download Restrictions.
See: s2Member -> Download Options -> Basic Download Restrictions
100 files every 30 days ( or something like that )

There are additional advanced methods for dealing with downloads as well.
I've done a video tutorial here: http://www.s2member.com/file-download-options-video/

Re: File Download Not Redirecting

PostPosted: September 4th, 2010, 2:08 am
by sadeght
Hello, We want you to change the upload path and give an example in another server file uploading and are subject to another server what should I upload thanks

Hello, We want you to change the upload path and give an example in another server file uploading and are subject to another server what should I upload thanks

/wp-content/plugins/s2member-files

to

domain.com/s2member-files

-------------------------------
Thanks are waiting for your response
:?: :)

Re: File Download Not Redirecting

PostPosted: September 7th, 2010, 8:06 pm
by Jason Caldwell
Hi there. If you would like to dynamically modify the root
location of s2Member files, here are a couple of ideas/options available.


1. In the functions.php file for your WordPress® theme, add this code snippet:
Code: Select all
add_action("ws_plugin__s2member_before_file_download_access", "my_custom_files_dir");
function my_custom_files_dir(){
    // Set this to the full server path ( no trailing slash )
    $GLOBALS["WS_PLUGIN__"]["s2member"]["c"]["files_dir"] = "/usr/home/path/to/files";
}
 

2. Create a symbolic link somewhere inside the /s2member-files/ directory.
http://en.wikipedia.org/wiki/Symbolic_link