View assets detail and download operation (#198)

* Fixed not displaying default user profile picture

* Added buttons to close viewer and micro-interaction for navigating assets left, right

* Add additional buttons to the control bar

* Display EXIF info

* Added map to detail info

* Handle user input keyboard

* Fixed incorrect file name when downloading multiple files

* Implemented download panel
This commit is contained in:
Alex 2022-06-03 11:04:30 -05:00 committed by GitHub
parent 6924aa5eb1
commit 53c3c916a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 798 additions and 100 deletions

View file

@ -147,15 +147,16 @@ export class UserService {
async getUserProfileImage(userId: string, res: Res) {
try {
const user = await this.userRepository.findOne({ id: userId })
if (!user.profileImagePath) {
console.log("empty return")
throw new BadRequestException('User does not have a profile image');
// throw new BadRequestException('User does not have a profile image');
res.status(404).send('User does not have a profile image');
return;
}
res.set({
'Content-Type': 'image/jpeg',
});
const fileStream = createReadStream(user.profileImagePath)
return new StreamableFile(fileStream);
} catch (e) {