Forum Replies Created
August 15, 2019 at 3:33 am in reply to: Request Timeout when downloading 10mb PDF filesize #1299
No. There is no configuration about secure downloads addon.
We have tried to reduce the pdf filesize down to 1.9mb and it is still registering the filesize to 374 bytes in the debug log.
Please do remember that I customize your code into my own hooks to make it able to work.
`2019-08-15 01:45:55: [SUCCESS] Making API call to subscribe user to list ID: 88a5060313
2019-08-15 01:45:55: [SUCCESS] Mailchimp sign-up API query successful.
2019-08-15 01:45:55: [SUCCESS] Notification email after download feature is enabled.
2019-08-15 01:45:55: [SUCCESS] Notification email sent to: mark@#########.com
2019-08-15 01:45:55: [SUCCESS] File Name: ##########.com/wp-content/uploads/2019/06/9701-#######-Brochure.pdf File Size:374 File Ext:pdf File Header:application/pdf
I agree on this.
Manually done this to one of my project, using cookie (manually edit the plugin script) and pass it with parameter, use get variable and set condition to display “Thank you… etc”.
I hope this should be part of the program.April 17, 2019 at 10:44 am in reply to: Squeeze Form – Downloading PDF result of Zero Bytes #1077
ok, so this is the final code that is completely working.
$parsed = parse_url( get_post_meta($postid, 'sdm_upload', true) ); $url = dirname( $parsed [ 'path' ] ) . '/' . rawurlencode( basename( $parsed[ 'path' ] ) ); // Combine the absolute path and the attachment url $filePath = ABSPATH . substr($url, 1); // Get the attachment file-size $size = filesize($filePath); // Temporary disable due to error // $headers = get_headers($file, 1); // $fsize = $headers['Content-Length'];
here’s the code will look like after the provision codes.
header('Content-Length: ' . $size); readfile( $filePath );
Hope this will help others.April 12, 2019 at 3:50 am in reply to: Squeeze Form – Downloading PDF result of Zero Bytes #1073
It’s been 4 and half months after I open this thread. My bad I didn’t provide yet any access to the author. However, it is bad as well that I didn’t see if they’ve manage to check this error/issue.
Anyway, upon debugging “in my case” today April 12,
readfile()is failing to give a
200 okcode to the header in-which resulting
http/1.1 403 forbiddento the attached PDF file.
Warning: readfile(http://localhost:8888/wp-content/uploads/2019/01/Brochure.pdf): failed to open stream: HTTP request failed! HTTP/1.1 403 Forbidden in /Users/mac/Sites/sandbox/wp-content/plugins/sdm-squeeze-form/sdm-sf-shortcodes.php on line 281
Base on my findings,
readfile()throwing 403 to the pdf attachment which ending-up zero-byte. I tried to create small code inside the
$parsed = parse_url( get_post_meta($postid, ‘sdm_upload’, true) );
$url = dirname( $parsed [ ‘path’ ] ) . ‘/’ . rawurlencode( basename( $parsed[ ‘path’ ] ) );
$filePath = ABSPATH . substr($url, 1);
then I rewrite the readfile( $file ) var into
readfile( $filePath );
Overall, I am still open for some comments if they’ve manage to fix this issue. Else, i will mark this as resolved, if I can prove that the code I am using is the solution to this case.
Regards,November 22, 2018 at 5:27 am in reply to: Squeeze Form – Downloading PDF result of Zero Bytes #853
As your suggestion, please watch the video. drive.google.com/open?id=1VBzlkoUtNUASF9mSIHmr5Pz-83fVD_rK
Actually, my theme does heave header and footer. Since it was custom theme (and fresh installed) made by me to my client, it was more optimized than the usual.November 21, 2018 at 3:14 am in reply to: Squeeze Form – Downloading PDF result of Zero Bytes #851
Please watch this video i made… drive.google.com/open?id=1v3wtWJqMNVDRtCfGtxJnsHQ4ASpcLfj2
Regarding page, I will create one for you guys.
Hi Chanel… Yeah I thought it was.. but it wasn’t. I manually configure and hooked it. I don’t know why. Out of frustration, I break the plugin and do all stuff to make it working.
The process i can see from the debug:
[SUCCESS] Sqeeze form submitted. Processing submission.
[SUCCESS] Mailchimp signup is enabled.
[SUCCESS] Making API call to subscribe user to list ID: 00000000
[SUCCESS] Mailchimp sign-up API query successful.
i dont see this:
[SUCCESS] Notification email after download feature is enabled.
During the time I am testing the SF download shortcode, i tried to use the SDM shortcode and it works, it sends me an email… then when I go back to SF download, i don’t receive any email notification.
It looks like a charm.. and it is working back fine now. I don’t know why.