File uploading (type:'file')

Source code: Survey setup
Survey.defaultBootstrapCss.navigationButton = "btn btn-primary";
Survey.Survey.cssType = "bootstrap";
var survey = new Survey.Model({ questions: [
    { type: "file", title: "Please upload your photo", name: "image", storeDataAsText: true, showPreview: true, imageWidth: 150, maxSize: 102400 }
]});

function onAngularComponentInit() {
    Survey.SurveyNG.render("surveyElement", {model:survey});
}
var HelloApp =
    ng.core
        .Component({
            selector: 'ng-app',
            template: '<div id="surveyContainer" class="survey-container contentcontainer codecontainer">' +
            '<div id="surveyElement"></div></div>'
        })
        .Class({
            constructor: function() {
            },
            ngOnInit: function() {
                onAngularComponentInit();
            }
        });
document.addEventListener('DOMContentLoaded', function() {
    ng.platformBrowserDynamic.bootstrap(HelloApp);
});

Preview the image: default is false.

survey.getQuestionByName('image').showPreview = yourValue; survey.render();

Store file content directoy in data JSON: default is false.

survey.getQuestionByName('image').storeDataAsText = yourValue; survey.render();

Image Preview Height: default is empty.

survey.getQuestionByName('image').imageHeight; survey.render();

Image Preview Width: default is empty.

survey.getQuestionByName('image').imageWidth; survey.render();

File Max Size (in bytes): default is 0 (no limits).

survey.getQuestionByName('image').maxSize; survey.render();