message: Added allowImagesPreview option for the file question, implemented
diff: @@ -92,6 +92,15 @@ export class QuestionFileModel extends Question {
  public set waitForUpload(val: boolean) {
  this.setPropertyValue("waitForUpload", val);
  }
  + /**
  + * Set it to false if you want to disable images preview.
  + */
  + public get allowImagesPreview(): boolean {
  + return this.getPropertyValue("allowImagesPreview", true);
  + }
  + public set allowImagesPreview(val: boolean) {
  + this.setPropertyValue("allowImagesPreview", val);
  + }
  /**
  * Use this property to setup the maximum allowed file size.
  */
  @@ -209,7 +218,7 @@ export class QuestionFileModel extends Question {
  }
  }
  public canPreviewImage(fileItem: any): boolean {
  - return !!fileItem && this.isFileImage(fileItem);
  + return this.allowImagesPreview && !!fileItem && this.isFileImage(fileItem);
  }
  protected setQuestionValue(newValue: any) {
  super.setQuestionValue(newValue);
  @@ -341,6 +350,7 @@ JsonObject.metaData.addClass(
  [
  { name: "showPreview:boolean", default: true },
  "allowMultiple:boolean",
  + "allowImagesPreview:boolean",
  "imageHeight",
  "imageWidth",
  "acceptedTypes",
  