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 Types

File field settings


About the Secure File Setting

Secure Files: When a file is downloaded, a private, temporary link is created that expires automatically

Non-Secured Files: When a file is downloaded, the link created is a predictable, permanent URL that anyone can access if they know or guess the link

Security benefits of Secured Files

  • Not publicly accessible: Files won't be hosted on public servers or indexed by search engines
  • Harder to guess: Links use complex, unpredictable URLs instead of predictable patterns
  • Automatic expiration: Links expire automatically, limiting long-term exposure
  • No login required: Recipients can still access files via email without logging into the Live App, but only through the secure link

Changing this setting

  • Turning OFF Secure File: Files will become publicly accessible using standard URLs that don't expire
  • Turning ON Secure File: Files will use private, temporary links for better security
  • Important: Changing this setting generates new file download links and permanently breaks all existing links that have been shared. The files themselves remain unchanged.

Security risks of disabling Secure File

  • Files become publicly accessible and may be indexed by search engines, or used as training data for AI models which scrape the internet
  • Anyone who guesses or finds your file URLs can access them
  • Links never expire, creating permanent access points
  • Files may be easier to discover accidentally

Recommendation

Enable the Secure File setting for better file security while maintaining easy sharing via email.

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

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.


What’s Next