-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update download link does not work when masking the url #525
Comments
Can you elaborate on "update fails"? Are there any error messages when that happens? Tip: If you see an update notification on the "Plugins" page, you can right-click the "update now" link and open it in a new tab to install the update in a way that will also display more information about the update process. Also, you could use something like Log HTTP Requests to see what response WordPress gets when it tries to download the update. |
found the problem, |
This may be the cause of my issue #489 I'm using endpoints API in my server implementation too. Fix: When download is requested from same site, just provide local path instead of link (see the issue above). |
Hey,
I have a plugin that receives updates from a file on my server and it works great.
I use – https://github.com/YahnisElsts/plugin-update-checker
My problem is when I try to change the file link to a masked link the update fails. The link behaves like a downloadable file but in practice it fails.
for example:
https://example.com/download/file.zip – works great
https://example.com/wp-json/my-end-point/v1/download – does not work
I added the headers:
header("Content-Type: application/octet-stream");
header('Content-Type: application/zip');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename="file.zip"");
readfile('https://example.com/download/file.zip');
When you enter the link https://example.com/wp-json/my-end-point/v1/download, the file downloads properly through the browser.
The idea is that I can verify before downloading the file
How can I solve this?
The text was updated successfully, but these errors were encountered: