-
Notifications
You must be signed in to change notification settings - Fork 40
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
JS SDK "getfilelink" api does not work. #4
Comments
Hello, Also, do you use other Cloud APIs and do you know how they work around this issue? |
Hello, Thank you |
How to play a video on web client? Received 7010 when using gethlslink. |
That's really disappointing. An artificial limitation like this should be documented clearly, not left to be discovered when people have already made an investment in your tech on other platforms. |
The problem (I had the same after long work time) is that the api creates links to download files/images/etc for a determinated IP, so if you generate the link (as I made) from your server side (the link is limited to the server IP), so if you try to consume the link from the client side (as also I made), it doesn't work, because are not available. And yes is really disappointed that this restriction is not documented in any place, and also that you cannot disable it. For me worked fine for weeks that I only tried in localhost, and when I was ready to publish it, boom, it doesn't work. |
I was actually generating download links and consuming them in the same place (I was using the API client in a SPA). If I ran it from localhost, everything worked well (and the API was nice and fast, too, unlike Dropbox), but I started getting "invalid referrer" errors when I tried to deploy anywhere else, indicating that it's not just a design issue but a deliberate, artificial restriction with an exception for local development and that it would have been less engineering to just allow browser clients to download files. That combined with the lack of documentation left a bad taste. |
Hi, |
Seems, what we need is to be able to generate the link on behalf of the client IP at server level. |
The example files seem to expect this to work -- see the Use case: I would like to download music files and push their content into an And, you know, also so that the examples work as expected. 😉 |
when i call "getfilelink" api on the web, An error occurs.
client.getfilelink(4130653400).then(function(resp){ });
https://api.pcloud.com/getfilelink?access_token=??????&fileid=4130653400&forcedownload=1
Error:
{result: 7010, error: "Invalid link referer."}
Please fix this problem.
and I also hope that the direct-download link supports CORS for XHR.
The text was updated successfully, but these errors were encountered: