Search the Community
Showing results for tags 'file'.
-
Are file data types available in trigger?
-
Hi there. I was trying to find a way to preview a PDF file before it is uploaded in a DataPage. The flow described in this article works for images only: https://howto.caspio.com/tech-tips-and-articles/advanced-customizations/preview-an-image-before-it-is-uploaded-in-a-datapage/ Here is a solution I came up with: <script> const HTMLFileInput = document.getElementById("EditRecordFile_1"); HTMLFileInput.addEventListener("change", event => { const src = URL.createObjectURL(event.target.files[0]); const outputWidth = window.getComputedStyle(HTMLFileInput.parentElement.parentElement).getPropertyValue('width') const outputHeight = parseInt(outputWidth.replace('px',''))*1.3+'px' if(document.querySelector('#output')==null) { HTMLFileInput.parentElement.insertAdjacentHTML('afterend', `<iframe src="${src}" width="${outputWidth}" height="${outputHeight }" id="output" class="cbFormFieldCell">IFRAME IS NOT SUPPORTED IN YOUR BROWSER</iframe>`) } else { document.querySelector('#output').setAttribute("src", src) } }) </script> Just substitute EditRecordFile_1 with id of your file input. You can also tweak the value of width and the height of the iframe so it fits your usual pdf file size. Hope this helps
-
- javascript
- file
-
(and 1 more)
Tagged with:
-
Hello, In localization, I could not find anything to change the text for file field. For an example, how to change the text for "Choose File" and "No File Chosen"?
- 2 replies
-
- localization
- file
-
(and 2 more)
Tagged with:
-
Hello caspio! We have a file upload picker in our application and I'd like to capture the filename that is selected in the upload field within another virtual field. I was trying to do this as a calculated value but I cannot reference the file field in the field picker. There doesn't seem to be a way to get the filename after a file is selected. Has anyone been able to get the filename of a file selected in the file picker? I inspected the page elements after picking a file and could not see a way to access the name of the selected field with JavaScript either. I'm trying to get the filename in order to display it in another section of the datapage. Any advice would be welcome!
-
I don't know why but Caspio is not letting me upload .jpeg or .png files, individually or even when they're zipped in the 'Files' folder. Any idea why this could be happening? THanks,
-
Hello everyone. Quick question. I know I'm asking for a lot here but is it possible to create a javascript where users can upload multiple fields directly into a table? Currently you can download a spreadsheet of your table in the Data Report portion, but I am wondering if there is a way for the user to take that exact spreadsheet, fill it out, and upload it into the same data table through a data page?
- 1 reply
-
- data table
- upload
-
(and 1 more)
Tagged with: