File Fields
File Fields
Files
Files fields are used to add files and attachments through forms that can then be downloaded by your users.

File field settings
Settings:
- Secure: Setting this option to "Yes" provides protection for your files
Additional Information:
- Asset uploads should only ever be connected to individual fields.
- Knack does not support the same asset file (representing one file upload) to be connected to more than one field. It is okay to have the same file/image for different fields/records but these will be different copies of the same asset file.
- If you wish to upload the same file and connect it to multiple fields, you must re-upload the file for each field you wish to connect the file to.
Image
Image fields are used to upload and display images. You can also create thumbnail versions of the image to display where needed.

Image field settings
Settings:
- Image Source: Determines where the image files are stored.
- Upload image files: Users will upload image files, and they will be stored on your Knack account and count toward your asset storage limit. The uploaded image will be given a URL that can be accessed externally of Knack. As such, it is not recommended to upload images with any sensitive information to an image field.
- Load images from external URL: The user will add a link (URL) to where the image is already uploaded and stored. These images will not count toward your asset storage limit. The source image of this URL can be updated without being updated in Knack.
- Resize Image: If checked, this will automatically resize images on upload.
- Web friendly: resizes the image to a web-friendly size with a maximum width and height of 1500px
- Custom: allows you to define a custom width and height
- Thumbnails: Thumbnails, smaller versions of an image, can be generated automatically for you to display throughout your apps. After clicking Add Thumbnail, you can use the "+ " and "-" buttons to add or remove further thumbnails. There are three types of thumbnails:
- Resize by percentage: The thumbnail will be resized by the percentage and maintain its ratio.
- Resize by pixel: The thumbnail will be resized based on the max width or the max height, whichever applies first to the image. The other dimension will then scale to maintain the correct ratio.
- Resize to square: The thumbnail will be resized to a square. If the original image is not a square ratio, then the larger dimension will be cropped to create a square.
Additional Information:
To display a Google Drive image, ensure that the URL follows this format:
https://drive.google.com/thumbnail?id=YourFileID
Images must be resized using a thumbnail in order to display as a smaller size in your app. CSS code could be used to edit this as well.
Image Indexing: If you include images in a Live App page where there is not a login required, the images can be found and indexed by Search Engines. To prevent unwanted exposure, make sure that your images are only displayed on pages that require a login.
If you choose the "Load images from an external URL" for your image type, these images do not store an actual thumbnail image. These thumbnails are dynamically generated on the page load where the image thumbnail is displayed. This means that if this option is chosen, thumbnail images downloaded or accessed with an API call will be returned in full size.
Images uploaded to an Image field will be accessible outside of Knack. Following a direct link to an image will not require any authentication to view the image.
Note: It is recommended to use a File field, set as secure, to upload images to if your images will contain sensitive information.
Updated 10 days ago