mirror of https://github.com/LemmyNet/lemmy.git
Check for pictshare status ok.
parent
72c5bdbf9e
commit
862321aa39
|
@ -818,12 +818,19 @@ export class PostListing extends Component<PostListingProps, PostListingState> {
|
||||||
)
|
)
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(res => {
|
.then(res => {
|
||||||
let url = `${window.location.origin}/pictshare/${res.url}`;
|
if (res.status == 'ok') {
|
||||||
if (res.filetype == 'mp4') {
|
let url = `${window.location.origin}/pictshare/${res.url}`;
|
||||||
url += '/raw';
|
if (res.filetype == 'mp4') {
|
||||||
|
url += '/raw';
|
||||||
|
}
|
||||||
|
this.state.thumbnail = url;
|
||||||
|
this.setState(this.state);
|
||||||
|
} else {
|
||||||
|
console.error(
|
||||||
|
`Couldn't cache pictshare url: ${this.state.iframely.thumbnail_url}`
|
||||||
|
);
|
||||||
|
console.error(res);
|
||||||
}
|
}
|
||||||
this.state.thumbnail = url;
|
|
||||||
this.setState(this.state);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue