Giter VIP home page Giter VIP logo

oncase-biserver-uploader's Introduction

oncase-biserver-uploader

Bean for Pentaho that implements an uploader that redirects the call to a given endpoint passing the file path and more parameters

Purpose

With sparkl, there's now a lot of plugins being built to Pentaho BI-Server. However, at this point it's still not possible to have upload easily implemented on Pentaho without coding a custom Java class.

With oncase-biserver-uploader, you should simply add our lib and change your plugin.spring.xml to be ready for uploading and post-processing your files.

Enabling

You should only:

  • copy our JAR oncase-biserver-uploader-X.X.X.jar to your plugin lib folder and then;
  • add the following line to your plugin.spring.xml, after the org.pentaho.platform.web.servlet.JAXRSPluginServlet bean:
<bean id="YOU_PLUGIN_ID.uploader.api" class="com.oncase.biserver.ws.UploaderREST"/>

After this, you just need to restart your bi-server and you should be ready to use

Using

You can now upload your files and tell the uploader which endpoint you want to call next and what parameters to forward.

The multipart/form-data POST should be sent to /pentaho/plugin/YOU_PLUGIN_ID/api/upload/send and this endpoint accepts the parameters:

  • file - The file that will be uploaded;
  • endpointPath - The path to the endpoint that will be called after the upload is done. This path is relative to the contextPath (after the …:8080/pentaho/) ex.: plugin/tapa/api/uploadedfiletester ;
  • queryParameters - Any queryparameters you’d want to forward to your endpoint. ex.: &paramtemplate=tapa-default&paramtableId=123.

Examples

There are some example files inside of resources/ folder.

oncase-biserver-uploader's People

Contributors

marpontes avatar

Stargazers

 avatar Joel Latino avatar

Watchers

James Cloos avatar Sergio Ramazzina avatar  avatar

Forkers

gjongerh oncase

oncase-biserver-uploader's Issues

Doesnt work with IE

unfortunately this doesnt work with IE. I've not got to the bottom of why IE is so rubbish in this respect, but i think it may be something related to tomcat and/or the pentaho server itself. it would be interesting to see if this code works fine in a clean app server.

Anyway I implemented a workaround to add a hidden field to the form, and set that to the filename, and use that when writing the file to disk. I could offer that as a pull request, but its a workaround only, not a fix :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.