hi, as a developer,
I want to creat a temporary link to download content in dropbox, and I use code like this:
DbxRequestConfig config = DbxRequestConfig.newBuilder("dropbox/java-tutorial").build();
DbxClientV2 client = new DbxClientV2(config, accessToken);
GetTemporaryLinkResult temporaryLinkResult = client.files().getTemporaryLink(id);
but now this temp link I can not download content which I could download contents before.
I want to know why? or what can I do to resolve this issue?
Can you share the rest of the steps/code to reproduce the error you're getting? Specifically, you shared the code to retrieving the link itself, but how are you accessing the link that then fails?
I can use the code you shared to retrieve a temporary link, and accessing that link is working successfully for me.
Is there anything on your system/network connection, such as a firewall, proxy, VPN, anti-virus, etc., that may be interfering with connections to *.dl.dropboxusercontent.com?
we found the root case, Because you put a # at the end of the return value
This # is useless and can be deleted. the link is still work.
I want to know why you guys put a useless # at the end of the link?
and will you make similar adjustments in the future?
Thanks for following up. I'm glad to hear you tracked this down.
The "#" is a character for identifying the beginning of the "fragment" portion in a URI. It's a valid part of a URL, but it sounds like your HTTPS client isn't handling it properly. It's not strictly needed in this case though so you can remove it in your code to work around that. In any case, the Dropbox API spec doesn't guarantee its presence or absence, so I can't promise if it will always be included or not. I recommend making sure your code can handle either case.
The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.Sound good? Let's get started.
For more info on available support options, see this article.
If you found the answer to your question, please 'like' the post to say thanks to the user!