How to create bespoke file downloads
Bespoke file downloads are something we have been asked for a while.
Recently we were tasked to create unique download links that expire after a certain amount of time / usage. But before we talk of our particular case, let’s have a look together on what you could do without having a script written exactly for this purpose.
Table of Contents
Sharing media files over the internet
When you are sharing media files on the internet, you might want to limit the number of people who can download it. Google Drive has a setting where you can set a limit on how many people can download the file. This setting is set to five gigabytes. Once this limit is reached, the recipient is notified via email that the file has reached its limit. You can raise the limit for a particular recipient or package.
Limiting downloads on a “per session” base
The download limit is calculated on a per-session basis, so the maximum number of attempts is limited to a certain amount of time. Each successful download increments the download limit. This means that a single recipient can download a delivery multiple times within a single session.
To enable the Limit Downloads feature, the recipient must first enable the Limit Downloads option in the recipient’s account. The default limit is two gigabytes, so you should adjust the limit to meet your needs.
Limiting the bandwidth
When you set a bandwidth limit, you’ll need to consider how many simultaneous downloads the recipient can perform. Google Drive will automatically stop downloads if it detects unusual bandwidth usage, so you need to keep this in mind. Then, you can set a lower limit if necessary. But be careful, you won’t want to set your limits too high, because it could make your media unavailable for other users.
A different scenario for bespoke file downloads
Imagine if you need to give a link to download a file and you want this link to be used only once and that this link has a timed expiration. Science fiction? Not at all, from today it’s possible.
Yes, with the bespoke file downloads system that we propose in this article, we offer you just this type of scenario.
One of our clients needed to send links to media downloads via email but wanted them to have a deadline of how many times that particular link could be used and also deadlines for the use of that link as their promotion was worth only for a week.
How to make download links expire?
This is an advanced feature that requires medium to intermediate PHP skills. Using the example here, you will see a demo to show you how to generate links that then to after a certain amount of time (in this case we have set it for a week).
Once you have a URL that has an expiration date, you can add it to a personalized email for your customers. Once your users have downloaded the file, the link has done the job and it won’t be available anymore.
When is this feature needed?
Bespoke file downloads enable you to provide your customers with files that they can download and keep on their computer. These types of files can include PDFs, music, and other files.
With this feature, you can add download links to or for digital products without the hassle of having the links shared indefinitely. You can even embed a download link on the product page and send it to your customer’s email.
In conclusion: Bespoke file downloads
Bespoke file downloads allow you to offer a customized solution to your clients. With this type of download, the model data is always the same, you create a file download link that is unique and can only be downloaded once in a matter of days/weeks/months.
This type of download is ideal for businesses who want to share their work with others but want to limit the sharing.
The post How to create bespoke file downloads first appeared on Phuket Web Design.
Bespoke file downloads are something we have been asked for a while. Recently we were tasked to create unique download links that expire after a certain..
The post How to create bespoke file downloads first appeared on Phuket Web Design.
Daniele Pais
{authorlink}
https://danielepais.com/journal/feed/
Phuket Web Design
https://danielepais.com/journal/wp-content/uploads/2016/11/cropped-logo-shadow-1-32×32.png
Digital Services & Freelance
March 11, 2022
7:33 am




