Merge branch 'julius-dev' of Software_Engineering_I/greenvironment-frontend into master

master
Trivernis 5 years ago committed by Gitea
commit c6bd872835

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

Loading…
Cancel
Save