Search.../

fileType

Sets or gets the type of file a site visitor can upload.

Description

Setting the fileType property sets the type of file a site visitor can upload. You can set the value of fileType to one of the following:

  • 'Image'
  • 'Document'
  • 'Video'
  • 'Audio'
  • 'Gallery' (both images and videos)

If you don't set the value of the fileType property, the value defaults to Image. You can also set the fileType by using the upload button's Settings panel in the Editor.

Getting the fileType property returns the current type of file a site visitor can upload.

The following file types can be uploaded:

  • Image: BMP, GIF, HEIC, HEIF, JFIF, JPE, JPEG, JPG, PNG, TIF, TIFF, WEBP

  • Document: AI, CDR, CSV, DOC, DOCX, DOT, DOTX, DWG, EPS, EPUB, FLA, GPX, INDD, IPYNB, KEY, KML, KMZ, MOBI, NUMBERS, ODG, ODP, ODS, ODT, OTP, OTS, OTT, OXPS, PAGES, PDF, PKG, POT, POTX, PPS, PPSX, PPT, PPTX, PSD, PUB, RTF, TXT, VCF, XCF, XLS, XLSX, XLT, XLTX, XPS

  • Video: AVI, DIVX, FLV, MKV, MOV, MPE, MPEG, MPG, MP4, MXF, M2TS, M4V, OGV, VOB, WEBM, WMV, XVID, 3GP

  • Audio: AAC, AIF, AIFF, FLAC, MP3, M4A, WAV, WMA

Type:

stringRead & Write

Was this helpful?

Get an upload button's type

Copy Code
1let fileType = $w("#myUploadButton").fileType;
Set an upload button's type

Copy Code
1$w("#myUploadButton").fileType = "Document";