Guest User

Parsing Showpad CSV asset in Experience Apps trough Papa Parse

a guest
Nov 9th, 2020
66
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const URL = window.ShowpadLib.getAssetFileUrl(asset.id, asset.slug !== undefined ? asset.slug : asset.appLink.replace('showpad://file/', ''))
  2.  
  3. Papa.parse(URL, {
  4.   header: true,
  5.   worker: true,
  6.  
  7.   download: true,
  8.   withCredentials: true,
  9.  
  10.   complete: (results) => {
  11.     console.log(results)
  12.   }
  13. })
RAW Paste Data