Hi guys,
hope you are doing well. I would like to know if is possible to upload and read files in freshservice. Right now Im using crayons but i dont have any idea how to read the content inside the files and I need it because inside the file is information to create departments and contracts. Here is the code:
<body>
<div class="fw-flex fw-flex-column fw-justify-center">
<fw-file-uploader
name="sample"
id="file-uploader-1"
text="Upload CSV"
description="or drag and drop your csv file here"
hint="File size must be within 5MB"
max-file-size="5"
accept=".csv"
action-u-r-l="https://mocktarget.apigee.net/echo"
>
</fw-file-uploader>
<br/>
<fw-button file-uploader-id="file-uploader-1">Upload file</fw-button>
</div>
</body>
<script src="scripts/app.js"></script>
<script type="application/javascript">
const fileUploader1 = document.querySelector('#file-uploader-1');
fileUploader1.addEventListener('fwFilesUploaded', (event) => {
console.log(event);
});
</script>
Thank you