How to import file into confluence via my custom plugin

Deleted user April 24, 2017

Hello everyone,

To templates I use soy. I write plugin to import csv file info confluence. I have a problem with that.

Do you know how I can load file via my custom plugin? I thought that I can do it using html tag related to file uploading, but this solution doesn't work.

Any ideas? I would be apprecaite if you could help me. 

Template:

{template .page1Form}
 	 <form class="aui">
         <fieldset>
             <legend><span>File upload</span></legend>
             <div class="field-group">
                 <label for="file-upload-example">Upload file</label>
                 <input class="upfile" type="file" id="file-upload-example" name="file-upload-example">
             </div>
         </fieldset>
     </form>
{/template}

Java code:

public class MyContextProvider extends AbstractBlueprintContextProvider {

    @Override
    protected BlueprintContext updateBlueprintContext(BlueprintContext blueprintContext) {

        blueprintContext.get("file-upload-example");

        return blueprintContext;
    }
}

But blueprintContext.get("file-upload-example"); is null...

 

1 answer

1 vote
Daniel Eads _unmonitored account_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 24, 2017

Hi Piotr!

There is now a separate community forum for developer questions - you'll likely get more traction asking this question on the developer community.


All the best,
Daniel

Deleted user April 24, 2017

Ok, thanks. I'll write post there.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events