I modify one image and show it in modal, but I do not get the URL of the image because this image is modified and displayed in bootstrap modal. I want to get the URL for this image in JavaScript to upload to the server.
I have already seen this link, but I am not satisfied with this solution: https://stackoverflow.com/a/464629/
HTML CODE:
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
<a class="btn btn-primary" id="upload" download="cropped.png" href="javascript:void(0);">Upload</a>
</div>
JavaScript Code:
$('#upload').click(function () {
var b = result.toDataURL();
$.ajax({
url: "/sf/p/customizeText",
type: 'GET',
data: b,
success: function (response) {
},
complete: function (response) {
},
error: function (response) {
}
});
});
URL ,
URL , ,
.
b. bas64, /sf/p/customizeText (url) ajax?
result.toDataURL() varaible b ajax
data: b,
, .