I am writing a simple plugin that generates a special purpose Powerpoint presentation from an existing Confluence page.
The file needs to be (1) generated upon the user clicking a button, (2) stored somewhere temporarily and (3) be offered to the (authenticated) user to download by an "open/dowload file" prompt.
The user interface part (1) is working as expected, but I am stuck in (2)nd and (3)rd part. Currently I am storing the file in the local plugin directory by most basic means:
File file = new File("export.pptx");
// ... Open stream, write to file and close stream
But I am aware that this is far from being the best practice. Where should I store these generated files instead? How can I authenticate the user who clicked the button to access this file, get a Uniform Resource Identifier belonging to the file so that I can redirect the user to this address and pop up the "open/download file" prompt?
By examining other plugins, I've concluded that I am probably going to need to use the GateKeeper interface, but there are unfortunately no tutorials about using it. Therefore, a most basic functional code example would be highly appreciated.
If anyone is interested, I've reopened this question at https://community.developer.atlassian.com/t/how-to-store-a-blob-and-authenticate-users-to-download-it/24577
Hi @Arın Mirza,
do you know the Atlassian Developer Community:
https://community.developer.atlassian.com/
Maybe you find an answer for your question there.
I am totally in wrong part of the website, thank you for the notice.
Edit: Is there a proper way to delete this question or inform the moderators to do so?
Edit 2: Please see https://community.developer.atlassian.com/t/how-to-store-a-blob-and-authenticate-users-to-download-it/24577
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.