I have been looking for a solution for the following problem for such a long time without any success
I need to find a way (via plugin or a different way) to let a user upload a pdf file on the the website. After the user has uploaded the file it should directly be visible on the site by the user as a text.
Can somebody help me out here?
Much appreciated!
Best regards
John
]]>For the past week, I have been trying to upload 2 PDF docs to our website.
I have tried reducing the size, renaming the file, deleting stuff from the media library to make space, I have cleared all the cache & cookies, but nothing seems towork. I keep getting an HTTP error (I did try uploading images and that worked fine. But for some reason, these two PDFs I can’t seem to upload.
Any way someone can help?
]]>Thanks,
Oliver
Trying to set up “Email Before Download” using Download Monitor in conjunction with Contact Form 7.
Any help would be great!
Thanks!
https://www.ads-software.com/plugins/download-monitor/
]]>I am suddenly unable to upload PDF files. The media library goes through the upload process without errors, but when I follow the URL to the newly uploaded PDF file, instead of showing me the file, I now get a 404 Page Not Found error.
All of my old PDF files still show up properly. I have always been able to upload a PDF without problem before now. I have no idea what would have changed.
I was still able to upload a jpg file to the media library today and was able to access the file properly. It is only the PDF files causing issue right now.
Thank you!
]]>Thanks
https://www.ads-software.com/plugins/s2member/
]]>https://www.ads-software.com/plugins/wp-members/
]]>Recently the method we were using stopped working, after a plugin/wp update I believe.
So what we were doing; I had created a new field in WP called Rate Sheets. In the field, someone could upload a PDF to the site and the code written would find the most current version of the PDF and embed it on the rate link I provided.
Recently it has stopped finding the most current PDF and we have had to manually insert the PDF name / location where $link is located in the code. Here is the current code.
functions.php
// Send most recent rate sheet doc if found.
function get_rate_sheet() {
$item = get_posts(array(
'post_type' => 'rate-sheet',
'posts_per_page' => 1,
'orderby' => 'date',
'order' => 'DESC'
));
if ($item) {
$item = $item[0];
$id = get_post_meta($item->ID, 'file', 1);
$link = wp_get_attachment_url($id);
/*
if ($link) {
//header("Location: $link");
wp_redirect($link,301);
die();
}
*/
return $link;
}
}
And the wbc_ratesheet.php code
<?php
/*
Template Name: Rate Sheet
*/
// Load the rate sheet doc. Show page as fallback.
$rateLink = $tcms->get_rate_sheet();
get_header();
global $post;
if (have_posts()) {
the_post();
}
?>
<?php /*<h2 class="contentHeader"><?php the_title(); ?></h2>*/ ?>
<!-- .contentArea -->
<div class="contentArea">
<h2 class="pageHeading"><?php the_title(); ?></h2>
<div class="post">
<div class="entry">
<div id="dlink"><a href="<?php echo $link; ?>" target="new">Download this rate sheet</a></div>
<iframe src="<?php echo $link; ?>" frameborder="0" id="iframe2" style="width:100%;height:1030px" ></iframe>
</div>
</div>
<div class="clear"></div>
</div>
<!-- / .contentArea -->
<?php get_footer(); ?>
Any clue as to why this is not working anymore?
]]>