Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 3Jan 3 I'm looking at the /api/downloads/files/{id}/download endpoint and I'm not seeing an actual viable way to download the file. I can either store the file in a public directory and expose its full path for anyone to share (without purchasing) or just have no way of downloading through API? Currently, I store all uploaded files in a non-public directory, so even if the full path is exposed, you can't access it (as it should be.) Since the response gives you the actual path, instead of a proxy URL, you can't actually use the URL response to download the file (because it's not public.) Is this intentional? Doesn't seem right. Edited January 3Jan 3 by Daddy
January 3Jan 3 The API would only provide you with the file information. It would be up to your resulting code to implement the needed download procedure. If you are wanting to hide the Download behind a hidden URL/payment, why not just use our software?
January 3Jan 3 Author 6 minutes ago, Jim M said: The API would only provide you with the file information. It would be up to your resulting code to implement the needed download procedure. If you are wanting to hide the Download behind a hidden URL/payment, why not just use our software? I am, but our API is public (using your rest API integration) and that endpoint exposes the full path. So we can't give the endpoint out to regular users to download paid content because it would expose the path. That's why we've opted to move uploaded content to a non-public to avoid this, but now there doesn't seem like a way to download files remotely now.
January 3Jan 3 1 hour ago, Daddy said: I am, but our API is public (using your rest API integration) and that endpoint exposes the full path. So we can't give the endpoint out to regular users to download paid content because it would expose the path. That's why we've opted to move uploaded content to a non-public to avoid this, but now there doesn't seem like a way to download files remotely now. You would build the download function into your application consuming our API. Otherwise, you would simply direct your customers to the Downloads application where the download URL is hidden and protected when downloading. Currently there is not a bug here as the API is working as intended.