Skip to content

Instantly share code, notes, and snippets.

@viestursGr
Created March 30, 2018 10:19
Show Gist options
  • Save viestursGr/8310378c0d43c660962f207fb38bd986 to your computer and use it in GitHub Desktop.
Save viestursGr/8310378c0d43c660962f207fb38bd986 to your computer and use it in GitHub Desktop.
this.on("success", function (file, response) {
if (response && response.length > 0) {
$.each(response, function (i, v) {
uploadedFileMap[file.upload.uuid] = response.find(function (element) {
return file.name == element.originalName;
});
});
}
changeThumbnailSuccessState(file, response);
//here
$(file.previewElement).find(".view-attachment").attr("href", file.dataURL);
$(file.previewElement).find(".view-attachment").attr("data-lightbox", "lightbox-gallery");
//data-lightbox="example-tag"
//file.previewElement.children.find(".view-attachment").
console.log(file);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment