1 image only
parent
e8be1ed470
commit
2a3c708291
|
@ -397,16 +397,16 @@ function formularErstellen(koordianten) {
|
|||
document.getElementById("form").appendChild(image_links);
|
||||
|
||||
let imageUpload = $('<div class="image-preview" id="image-upload">')
|
||||
imageUpload.html('<input type="hidden" role="uploadcare-uploader" data-public-key="3a3c37e85850c6cfe077" data-multiple="true" data-images-only data-public- data-clearable data-tabs="file camera" data-image-shrink: "1024x1024" data-system-dialog="false"/>')
|
||||
imageUpload.html('<input type="hidden" role="uploadcare-uploader" data-public-key="3a3c37e85850c6cfe077" data-multiple="false" data-images-only data-public- data-clearable data-tabs="file camera" data-image-shrink: "1024x1024" data-system-dialog="true"/>')
|
||||
imageUpload.appendTo("#overlay_container");
|
||||
|
||||
|
||||
|
||||
// get a widget reference
|
||||
const widget = uploadcare.Widget("[role=uploadcare-uploader]", { multiple: true});
|
||||
const widget = uploadcare.Widget("[role=uploadcare-uploader]", { multiple: false});
|
||||
|
||||
// listen to the "upload completed" event
|
||||
widget.onUploadComplete(fileGroupInfo => {
|
||||
widget.onUploadComplete(fileInfo => {
|
||||
// get a information about uploaded group
|
||||
// check https://uploadcare.com/docs/file-uploader-api/file-groups/#file-group-info
|
||||
|
||||
|
@ -415,19 +415,15 @@ function formularErstellen(koordianten) {
|
|||
|
||||
$("<div>").addClass("ImgPrevContainer").appendTo($("div.image-preview"));
|
||||
|
||||
for (var i = 0; i < fileGroupInfo.count; i++) {
|
||||
|
||||
ImgUrl = "https://ucarecdn.com/" + fileGroupInfo.uuid + "/nth/" + i + "/-/preview/-/quality/smart/-/format/auto/";
|
||||
|
||||
ImgUrl = "https://ucarecdn.com/" + fileInfo.uuid + "/-/preview/-/quality/smart/-/format/auto/";
|
||||
console.log(fileInfo);
|
||||
linkArr.push(ImgUrl);
|
||||
|
||||
|
||||
createImgPrev(ImgUrl + "-/resize/x100/"); //img Preview 100 pixels high
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
let linkArrString = JSON.stringify(linkArr);
|
||||
console.log(linkArrString);
|
||||
image_links.value = linkArrString;
|
||||
|
|
Loading…
Reference in New Issue