Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The FAQs provide some examples and code snippets for common tasks when a third-party application wants to interact with the server.

...

      3. Upload the users csv file:  

Code Block
curl http://host:port/frevvo/web/tn/tenant.id/allUsers  -F notificationEmailAddress=some_email_address -F usersFile=@users_file.csv  -X POST  -b cookies -H Content-Type:multipart/form-data

...

You can specify who receives an email reporting the upload status when it is done through the API. The email is sent to the "notificationEmailAddress" that is passed in the API. The email may say something like this if there are errors during the upload:

Code Block
Validation occurred with errors. Users data NOT loaded. Refer to attached CSV data file for validation and/or loading result details.

The attached file, results.csv, will contain the details.

Start a form or flow with an upload control pre-initialized with uploaded file attachments

How do I start a form or flow with an upload control pre-initialized with uploaded file attachments?

The same code works for either a form or workflow.  The code assumes the form/flow has an upload control with the name “upload”.

 

Code Block
FormTypeEntry ftEntry = …;  // See other examples for ways to derive the form type entry of the form/flow

FormEntryBuilder builder = ftEntry.createInstanceBuilder();

// attach several files to a single upload control
InputStream in = …; // Get attachment file 1 as input stream somehow
builder.attachment("upload", "image/png", “some_filename_1.png", in);   // parameters: upload control name, mime content type, the file name, input stream

URL imageUrl = new URL("http://www.example.com/some_image.png”);        // get this one remotely
builder.attachment("upload", "image/png", imageUrl);   

// create the form/flow instance
FormEntry fEntry = builder.createInstance();

// get the form/flow url to show to the user
URL fEntryURL = new URL(fEntry.getFormUseLink().getHref());