Source on GitHub
Definition: shared/definitions/creator-load-save.json
Commercial client licence: without SURVEYJS_LICENSE_KEY the component shows a licence banner
shared/client/creator-uploads.js · sjs:creator-uploads.client
View on GitHub
// Images and logos added in Creator: store them, keep only the URL in the definition
creator.onUploadFile.add(async (_, options) => {
const body = new FormData();
options.files.forEach(file => body.append("files[]", file)); // POST /api/files; "files[]" for PHP
const [id] = await fetch("/api/files", { method: "POST", body }).then(r => r.json());
options.callback("success", `/api/files/${id}`); // the endpoint returns ids: the definition keeps a URL
});