![]() ![]() We get the uploaded file information from the property. you can add a param for a script name for admins to test functionality, and then. Then add a change event listener to read the file object when the upload completes. At a high level, I prefer to use Web Files - your code can easily live in source control, team members can use Admin Web Roles to upload the files directly in the Portal without CDS access, you can use liquid tags to control which files to upload and when - e.g. To read the File object, we need to listen to the change event of the file uploader.įirst, get the file uploader instance by id, const fileUploader = document.getElementById( 'file-uploader') The JavaScript in the following example write a string of text to a. On successful upload, the File API makes it possible to read the File object using simple JavaScript code. To embed JavaScript in an HTML file, just add the code as the content of a
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |