All Questions
2,860
questions
0
votes
1
answer
35
views
How to protect from browser tab creation delivering a PDF file?
I have a website where, after login, people can download personalized PDF documents. There is a specific problem I found no solution or discussion on StackOverflow yet.
First, I deliver the documents ...
0
votes
2
answers
44
views
Force download a pdf on mobile device
I want to force a pdf to be downloaded on mobile/tablet device to avoid open it in a new tab.
I tried with the download attribute:
<a href="file.pdf" download target="_blank">...
0
votes
0
answers
59
views
Why are the download links on my site downloading an html-only .htm file of my index.php instead of the pdf it's linking to?
I learned html, css, and php, and used them to rebuild our company's site from the ground up, all in the course of about a month and a half. Whether due to my inexperience or rush job, or both, I've ...
4
votes
1
answer
50
views
File size is not visible in php download readfile
I used below code to force browser start download:
//send file
$fileName = basename($fullPath);
$length = filesize($fullPath);
header('Content-Type: application/octet-stream');
header("Content-...
0
votes
0
answers
49
views
Offer users a large file to download from Webserver? (4 - 20 GB)
First I would like to apologize for my stupidity...
I need to provide a download of large videofiles from a webpage.
The files are between 4 and 20 gb.
Question: What is the right way to enable such a ...
1
vote
2
answers
46
views
Hide download link as soon as the download starts
Question:
What do I have to do to hide a download link as soon as the download starts?
Problem:
The difficulty or problem for me here is that a password is sent with the user request. If the password ...
0
votes
1
answer
31
views
Create the original download link after checking the domain
I have put such a code in the functions.php file for the download links of my site:
// Define the function to generate the shortcode
function generate_download_shortcode( $atts ) {
// Get the file ...
-1
votes
1
answer
30
views
Replace urllib.request urlopen in PHP
I have a URL which can not download using video file using PHP. I have to run it ones in browser so that code can start downloading videos from it.
I have tried using curl, it fails to download video ...
1
vote
1
answer
42
views
Saving a base64 code into a folder gives me a failed image and cannot open it with PHP
I am trying to save an image into a folder of my project, and file is saved but wrong, making it impossible to see or open.
First of all, I get the image through a form where base64 image code is ...
1
vote
1
answer
190
views
Google Drive API download files from shared drive
I am trying to download a file from a shared drive via the Google API. I always get the response that the file was not found (code 404).
This does not work even if I have full access (admin) to the ...
0
votes
2
answers
218
views
Downloading file in Laravel 10 in browser
I'm creating files using Jasper and now what I want to do is when user presses the button he will start to download those files, but when I tried it the response code is 200 but the popup window for ...
0
votes
1
answer
45
views
PHP: file functions (filesize, readile, unlink) don't work for file created by mysql
I have the following query (apache, php-7.4.33, mysql):
SELECT [blah] from [blah] INTO OUTFILE $tmpfile FIELDS TERMINATED BY ',' FIELDS TERMINATED BY '\n';
I am trying to download this from the ...
0
votes
0
answers
41
views
zip file generated by php isn't downloaded
I have a javascript app that asks php (8.1) to build and download to the user a zip file.
Here's the php code:
if (! empty($_POST) && ! empty($_POST["downloadzip"])) {
$...
0
votes
1
answer
148
views
Laravel Amazon S3 - downloads one file only: I want all files downloaded
I have a script I run from a Laravel web route and although all file names are in an array from the S3 directory, looping through the array only downloads the first image. For some reason the ...
0
votes
0
answers
58
views
bulk download images with javascript and php
I am trying to download a large amount of images. I have 1,300,000+ urls to images in my database. The images are hosted on many other external servers.
The image links do serve up images, but they do ...