You can upload individual files into an HTML presentation programmatically. This could be useful if your presentation has a data file that changes frequently (such as a customer list).

#!/bin/bash
# Read https://docs.mobilelocker.com/v3.0/reference#upload-a-file-programmatically
# Your
source $HOME/.mobilelocker
PRESENTATION_ID=[ENTER PRESENTATION ID HERE]
API_URL="https://app.mobilelocker.com/api/presentations/$PRESENTATION_ID/upload"
clear
echo "PRESENTATION_ID: $PRESENTATION_ID"
echo "API_URL:         $API_URL"
read -p "Press ENTER to continue."

# If you're using yarn
#yarn production

# zip everything into "presentation.zip"
rm -f presentation.zip
# Change "src" to whatever your subdirectory is called where the contents of your presentation live. They should not be in the root folder
cd src
zip -r --exclude=.gitignore ../presentation.zip .
cd ../


read -p "ZIP Complete. Press ENTER to upload."

# Scan the presentation to Mobile Locker using your API TOKEN
AUTH_HEADER="Authorization: Bearer $ML_API_TOKEN"
curl --header "$AUTH_HEADER" \
     -F "[email protected]" \
     "$API_URL"

echo ""
echo "COMPLETE"

open "https://app.mobilelocker.com/admin/presentations/$PRESENTATION_ID/"