Fix checking for video instead of image

master
trivernis 5 years ago
parent 504a6e2f6c
commit e3f5fc6519

@ -185,7 +185,7 @@ export class FeedService extends BaseService {
if (file) {
this.uploadPostImage(post.id, file).subscribe((result) => {
post.mediaUrl = result.fileName;
post.mediaType = result.fileName.endsWith('.webm') ? 'VIDEO' : 'IMAGE';
post.mediaType = result.fileName.endsWith('.png') ? 'IMAGE' : 'VIDEO';
this.posts.next(updatedPosts);
}, error => {
console.error(error);

Loading…
Cancel
Save