Skip to content

Instantly share code, notes, and snippets.

@zuzannamj
Created February 28, 2020 19:11
Show Gist options
  • Save zuzannamj/87008a77727e9451941d0123dd4cc9cb to your computer and use it in GitHub Desktop.
Save zuzannamj/87008a77727e9451941d0123dd4cc9cb to your computer and use it in GitHub Desktop.
var fileEncoded = reader.result;
var base64enc = fileEncoded.split(";base64,")[1];
var fullFileName = document.getElementById("file").files[0].name;
var fileName = fullFileName.split(".")[0];
var assetName = fullFileName.split(".")[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment