a simple way would be to set a cookie with a timestamp when they submit the form, then check for the cookie and valid timestamp when they hit the url to download the file.
a more complicated process would be to generate a unique url key for each user, put that in a db table with a timestamp, then look up the url, check the time and then delete when they hit it for download.
Related Posts:
- Creating directory in uploads – wp_mkdir_p() or WP_Filesystem?
- Convenient way to use wp_filesystem
- Is there a WP Way of getting a filehandle?
- Is fopen() forbidden in WP?
- Converting fopen/fwrite operations to WP_filesystem
- Is it bad to store many files in a single folder?
- External pages redirecting back to wordpress
- WordPress Login doesnt respond after using Filezilla to upload my files on the server
- List of files/folders writable by the web server?
- Save PDF File From Plugin to Filesystem /wp_upload
- accessing files in custom folder in wordpress
- What dependencies should I load and to use the WP_Filesystem?
- What files are safe to delete after a security breach in WP content folder?
- Failed opening required
- Correct file permissions for in-browser updates using WP-CLI
- WordPress installation on digitalocean eating the server storage
- Serve contents from Nextcloud / WebDAV
- temphangle variable missing when using wp_filesystem copy
- File ownership for file tree php user ID – Folder permission 775
- How to write to a text file and save it in a folder for later download?
- 403 Error on “/”
- Get names and paths from unzip_file()
- Should I use Filesystem API for reading files or listing directories?
- saving file to external server vip
- Does unzip_file() over-write by default?
- Where to store PHP files created by plugin / themes
- How to convert the file path to a URL of the same file?
- Do WordPress Core Filenames Work as Hooks?
- How to give image source in wordpress page editor?
- add/apend templates ‘transparently’ via plugin to currently active theme or child theme?
- delete uploaded file
- How to configure WP filesystem access in Linux (Ubuntu Server)?
- Necessary user, group and permissions for core updates
- $wp_filesystem returns NULL. What are the dependencies?
- Merging PHP download script into `functions.php`
- How do I edit the php/html for a particular post?
- Uploading non-media files?
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- Which actions can update/change .php files?
- wp_temp_dir does not change the /tmp temporary default directory
- wp-config.php file permissions
- Standard permissions for wordpress; Plugin installation asks for FTP credentials
- sanitize attachment filename
- How to move WordPress theme files into a subfolder without breaking the theme?
- How do I maintain static directories on multisite subdomains?
- Can’t write pdf file to upload directory using FPDF
- Change default uploads file using wp Skeleton
- Securing a multi-user permission structure
- Installation failed: Could not create directory – CentOS 7
- Relative file paths in CSS when linking directly (not enqueuing)
- Adding Adobe files to a wordpress site [closed]
- How to check if txt file exists inside template folder?
- Files automatically added
- WordPress HTTP Error on File upload
- Plugin writing: access file that was just uploaded
- How to implement filesystem cache in WordPress
- Interface for logged-in users to upload/download files
- Image URLs stopped working due to Permalinks?
- How to first edit in local WordPress editor on page and the add code?
- How to block access to files without modifying .htaccess or ngnix config? [closed]
- Why is server preventing admin styles? (Was: Where are WordPress sessions saved?)
- How to know which ajax file or function is called for action
- Running WordPress as FTP user?
- Can WP plugins access files outside the installation folder?
- How to replace file_get_contents() with a WordPress Filesystem call
- Is it better to store images and other files in the root directory or the theme directory
- How to edit php code in WordPress Post file?
- Theme, WordPress Version, MySQL Version, PHP Version Update affected files and folders
- Running rmdir function on post save
- Does WordPress create a new Linux user when creating a new WordPress blog?
- WordPress Creates Unused (Unregistered) Image Sizes
- Why does WP load so many files in the head of source code? How do I optimize it?
- Adding regular php file to site
- Should I store critical css in the database or in my theme’s filesystem?
- Look for a file in a theme before loading from plugin
- Removing the references to the wp-content folder
- Right way to download file from source to destination
- get_template_directory() returns wrong address on VPS
- Cleaning a filename after image sideloading a url that contains `%20`
- Generating and downloading files with WP API
- Page to show a link to every file in an directory
- Uploaded images result in a file url with full path on disk appended
- Save media files (images) to database instead of the filesystem
- Downloadable content file structure
- Creating an .ics calendar subscription service with wordpress
- How to include all files within a folder & its sub folders to functions.php?
- How to Call Function From Separate WordPress Install on Same Server?
- Can’t Install WordPress (local) Failed to open file wp-includes/wp-db.php
- Avoid ‘uploads’ 777 permissions: Potential threat or clean solution?
- Private file system for attachments
- Folder Permissions + Security Concerns
- Get original path of user’s filesystem of an uploaded media
- Making a custom upload form and page in the admin section
- Displaying $_FILES data (simlar to $_POST)
- wp_redirect to file:// location results in blank page/cannot be displayed page
- No error in debug mode, wordpress template can not be loaded
- Plugin installation works only with FTP – how to debug?
- How do I upload my WordPress code files from previous website onto local host WordPress website?
- WordPress files owner changed silently
- Hook on opening a media/document