mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-18 09:00:30 -05:00
Fix project report thumbnailer
Fixes https://github.com/LLK/scratch-www/issues/2550
This commit is contained in:
parent
aba70c7dc4
commit
44ffad0c96
1 changed files with 4 additions and 1 deletions
|
@ -388,7 +388,10 @@ class Preview extends React.Component {
|
||||||
const submit = data => this.props.reportProject(this.state.projectId, data, this.props.user.token);
|
const submit = data => this.props.reportProject(this.state.projectId, data, this.props.user.token);
|
||||||
if (this.getProjectThumbnail) {
|
if (this.getProjectThumbnail) {
|
||||||
this.getProjectThumbnail(thumbnail => {
|
this.getProjectThumbnail(thumbnail => {
|
||||||
const data = Object.assign({}, formData, {thumbnail});
|
const data = Object.assign({}, formData, {
|
||||||
|
// Strip the data:image prefix, server just wants the b64 encoded image
|
||||||
|
thumbnail: thumbnail.replace('data:image/png;base64,', '')
|
||||||
|
});
|
||||||
submit(data);
|
submit(data);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue