downloader

Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
in reply to: Downloads Broken after Upgrade to 4.2.1 #27453

downloader
Member

I disagree, regarding no “Download All” from S3 being a bug (the add-on shouldn’t break core functionality, for whatever reason, particularly with no mention anywhere), but more importantly:

Any update on the S3 AccessDenied error? (It’s been 1 week and 3 days since your last reply, and much longer since initially reported.)

It should be simple to test and provide me with a sample working bucket policy. If it’s broken, indeed, when might we anticipate a fix?

Thank you in advance for any help.

in reply to: after_downlaod (sic) not working #27246

downloader
Member

OK, great, thank you. I see it’s been changed on the docs page, but the actual code we still have to date still references “after_downlaod”:

/download-manager/wpdm-start-download.php:do_action(“after_downlaod”, $package);

And most importantly, it does not work. The first example below, shows the example code from your newly updated doc page:

FOLLOWING DOES NOT WORK (obviously, as my the latest wpdm pro code references “after_downlaod”):
<?php
add_action(“after_download”, “download_notification”,10,1);
function download_notification($package){
$package_data = get_post($package[‘ID’]);
$headers = ‘From: Site Name <noreply@sitename.com>’ . “\r\n”;
$headers .= ‘Content-type: text/html’ . “\r\n”;
$message = “Downloader’s IP: “. $_SERVER[‘REMOTE_ADDR’];
wp_mail(get_option(“admin_email”), “Download Notification: “.$package_data->post_title, $message, $headers);
}

FOLLOWING DOES NOT WORK, even when using “after_downlaod” (how it’s currently referenced in latest wpdm pro code):
<?php
add_action(“after_downlaod”, “download_notification”,10,1);
function download_notification($package){
$package_data = get_post($package[‘ID’]);
$headers = ‘From: Site Name <noreply@sitename.com>’ . “\r\n”;
$headers .= ‘Content-type: text/html’ . “\r\n”;
$message = “Downloader’s IP: “. $_SERVER[‘REMOTE_ADDR’];
wp_mail(get_option(“admin_email”), “Download Notification: “.$package_data->post_title, $message, $headers);
}

HOWEVER, as a control test, “before_download” — almost same example code on it’s docs page (with the call name changed only) DOES WORK:
<?php
function download_notification($package){
$package_data = get_post($package[‘ID’]);
$headers = ‘From: Site Name <noreply@sitename.com>’ . “rn”;
$headers .= ‘Content-type: text/html’ . “rn”;
$message = “Downloader’s IP: “. $_SERVER[‘REMOTE_ADDR’];
wp_mail(get_option(“admin_email”), “Download Notification: “.$package_data->post_title, $message, $headers);
}

add_action(“before_download, “download_notification”);
?>

Thank you.

in reply to: Downloads Broken after Upgrade to 4.2.1 #27117

downloader
Member

Thank you for the reply about multi-file downloads not working from S3. Not to be critical, but it seems like it should work… I’d call that a bug.

Still, I’m more interested in why the “AccessDenied”, per my detailed post prior. Any update welcome. Thanks again.

in reply to: Downloads Broken after Upgrade to 4.2.1 #27085

downloader
Member

Not to distract from the larger issue (Downloads not working when bucket has a policy specifying the correct aws user), but while troubleshooting and testing, I also noticed a problem where, when my policy was set to “*”, and S3 Downloads were working from the front-end, as individual files, Attempting to download the entire package as a .zip results in a downloaded zip of 0 bytes.

Again, I’m much less concerned with this issue than the original “AccessDenied” problem.

Thank you.

in reply to: Downloads Broken after Upgrade to 4.2.1 #27084

downloader
Member

I’m really confused by your email reply…

My issue is with the S3 add-on, not Web Hooks add-on. Was the reply meant for someone else?

I tried installing the latest Web Hooks add-on, in case the reply was meant for me, to fix the S3 issue. However, there was seemingly no change with the S3 problem.

The back end works fine, but the front end Download fails if I set S3 bucket permissions to the same user the wpdm admin is using. The only way the front-end works is if I change the bucket policy to let “*” (anyone in the world — not authenticated users) access the bucket.

Forum user motografik mentioned in this thread that he reverted to an older version of the S3 add-on and it fixed the issue (assuming he was indeed addressing the same issue I and the OP are having.) Do you know if this is true? (If so, and it’s stable, how might I get it, and what changes in the newer version would be lost?)

I really would like to get this working asap. Any help is appreciated.

Thank you!

Here is an example of my bucket permissions (wpdm Downlaods fail, but user credentials on back-end are same):
{
“Id”: “Policy1426198988997”,
“Statement”: [
{
“Sid”: “Stmt1426198332740”,
“Action”: “s3:*”,
“Effect”: “Allow”,
“Resource”: “arn:aws:s3:::BUCKET-NAME/*”,
“Principal”: {
“AWS”: [
“arn:aws:iam::ACCOUNT_NUMBER:user/USER_NAME”
]
}
}
]
}

Modifying the Principal only, to “*” allows WPDM Downloads to work, but my bucket is open to the world (unacceptable):
{
“Id”: “Policy1426198988997”,
“Statement”: [
{
“Sid”: “Stmt1426198332740”,
“Action”: “s3:*”,
“Effect”: “Allow”,
“Resource”: “arn:aws:s3:::BUCKET-NAME/*”,
“Principal”: “*”
}
]
}

Additional Note:
“Access Permissions” set for Authenticated Users seem to have no affect

in reply to: Downloads Broken after Upgrade to 4.2.1 #26844

downloader
Member

motografik: do you mean fixing the front-end “Access Denied” issue?

Shaon: any update on this? (I didn’t see a different version in the downloads, but am eager to get the fix if it exists.)

Thank you!

PS — thanks also for the https tip.


downloader
Member

Great! Thank you very much once again, for another very quick solution and release.

in reply to: Downloads Broken after Upgrade to 4.2.1 #26644

downloader
Member

It’s strange… the only way I can get it to work on the front-end is if I change my S3 Bucket policy to allow anonymous access to all (document-level permissions seem to have no bearing.) Do you have any docs for this or a demo?

Also, do you about my other question: if I can modify http: to https: ?

I don’t mind editing php myself, if you can let me know it will work, and where I might find the code in question. I need to make sure all requests are https: .

Thank you in advance for any help.


downloader
Member

Thank you.


downloader
Member

Thank you very much for the prompt fix and release! It appears to be working correctly now.

in reply to: Downloads Broken after Upgrade to 4.2.1 #26587

downloader
Member

Thank you for your reply, but I’m not clear on what you’re telling me to do, if anything. Or, if that was an explanation as to why S3 works fine in the admin but not for front-end users…

in reply to: Downloads Broken after Upgrade to 4.2.1 #26565

downloader
Member

The keys being used are from an S3 user had AmazonS3FullAccess user policy attached.

Why can the back-end access AWS (list files, create buckets, upload, attach), but not the front-end? (Assuming WPDM with S3 Add-On uses s3:GetObject, which is included in AmazonS3FullAccess user policy.)

in reply to: Downloads Broken after Upgrade to 4.2.1 #26540

downloader
Member

I also have a related question: Is there a way to use https: vs http: for downloads from Amazon S3? I noticed the current URLs use http:

in reply to: Downloads Broken after Upgrade to 4.2.1 #26536

downloader
Member

Having the same issue as a new user with a new install. In my case, I can use the S3 metabox on the Add New Package page to browse, create buckets, upload, and attach files. But when I try any actual download links on the front-end package page, I get something like this back:

<Error>AccessDenied<Message>Access Denied</Message><RequestId>95018697C3483B8C</RequestId><HostId>q1xdt364JafdEUe9gb8spFIQRjpm1IIGcM9T77jxD7v8u1ApEhYrDKBGxBu0TMYD</HostId></Error>

My AWS IAM user (whose keys are being used in WPDM Cloud settings tab) has AmazonS3FullAccess user policy attached. Please advise. Thank you. (Note: I’m unable to provide login access to either AWS nor WordPress.)

Viewing 14 posts - 1 through 14 (of 14 total)