-
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
pcloud Can't download file #6
Comments
See the other thread: #4 (comment) |
I saw that. |
From what I can tell looking through the code (and the error you recieved), the JS SDK is using the same HTTP API we've been trying. So I think, even though the SDK includes a I'm porting my app to Dropbox, which I've just verified to allow file downloading in the browser on an arbitrary site. Dunno if that helps you or not. |
It helps. |
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. |
The issue is that the method |
Yeah, it looks like that download.html file should've been removed. I got the token part working well (see this PR), but then ran into your run-of-the-mill CORS errors. As @igneosaur remarks, You're going to need a proxy like what's mentioned here, but one you're hosting yourself, I believe. |
I have a PWA app which gets access to its app folder only and is used to backup and (was hoping) restore the data and settings to/from pCloud. |
I've try example for download:
https://github.com/pCloud/pcloud-sdk-js/blob/master/examples/download.html
and it does not work.
When I clikc on "Get token", files are listed, but download button does not work.
Console.log:
Uncaught (in promise) {result: 7010, error: "Invalid link referer."}
The text was updated successfully, but these errors were encountered: