this.cropper.getCroppedCanvas({
width: 800,
height: 800,
minWidth: 256,
minHeight: 256,
maxWidth: 800,
maxHeight: 800,
})
.toBlob((blob) => {
let formData = new FormData();
formData.append('image', blob, 'image.jpeg');
if (this.name) formData.append('name', this.name);
axios({
method: 'POST',
url: '/user_load_post/',
xsrfHeaderName: 'X-CSRFToken',
headers: {
'Content-Type': 'multipart/form-data',
'X-CSRFToken': this.$getCookie('csrftoken')
},
data: formData
})
.then(response => console.log(response))
.catch(error => console.log(error))
}, 'image/jpeg', 0.95)
SELECT
USERS.LOGIN AS USER_LOGIN
, NEWS.ID AS NEWS_ID
, NEWS.TITLE AS NEWS_TITLE
, NEWS.TEXT AS NEWS_TEXT
FROM
USERS
LEFT OUTER JOIN
COMMENTS
ON
USERS.ID = COMMENTS.USER_ID
RIGHT OUTER JOIN
NEWS
ON
USERS.ID = NEWS.USER_ID
GROUP BY
NEWS.TITLE
, NEWS.TEXT
, USERS.LOGIN
, NEWS.ID
HAVING
(COUNT(COMMENTS.ID) > 1)