The Osmos Uploader provides a callback to the host page when the Osmos Uploader window closes. The callback is made to the function mapped to the completionHandler key. This key is optional. If a handler function is assigned, it will called providing:
  1. 1.
    originalFileUrl: URL of original uploaded file. The file will be available at this for the data retention duration configured on your Osmos account, after which the URL will return 404. In order to to avoid name collisions, the filename will be appended with GUID values.
  2. 2.
    reachedTransformStep: Boolean indicating if the user successfully reached the transformation step
  3. 3.
    successfullySubmittedData: Boolean if the user successfully submitted data and completed the upload experience
  4. 4.
    numRecordsSubmitted: Number of records submitted
  5. 5.
    skippedRowNumbers: Array of row numbers that were skipped, starting at data row number 0, and not including the header row in the count.
Here’s an example of a code snippet for a completionHandler callback
userID: window.curUserID,
completionHandler: async (params)=> {
schema: {
fields: [
name: 'field1',
displayName: 'Field 1',
interface CompletionHandlerArgs {
originalFileUrl: string,
reachedTransformStep: boolean,
successfullySubmittedData: boolean,
numRecordsSubmitted: number,
skippedRowNumbers: Array
Copy link