Skip to content

Commit

Permalink
Merge pull request #89 from VictoriqueMoe/fix-non-expire
Browse files Browse the repository at this point in the history
Fix DTO return for non expiring files
  • Loading branch information
nakedmcse authored Mar 4, 2024
2 parents aeea997 + 320a957 commit f827b22
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/model/rest/FileEntry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export class FileEntry {
const expiresIn = entry.expiresIn;
if (expiresIn !== null) {
fileEntryBuilder.expires(ObjectUtils.timeToHuman(expiresIn));
} else {
fileEntryBuilder.expires(null);
}
return fileEntryBuilder.build();
}
Expand Down
4 changes: 1 addition & 3 deletions src/public/secure/files.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
<th scope="col">file Size</th>
<th scope="col">Created At</th>
<th scope="col">expires</th>
<th scope="col">ip</th>
<th scope="col">mediaType</th>
<th scope="col">original FileName</th>
<th scope="col">url</th>
Expand Down Expand Up @@ -200,8 +199,7 @@
{data: 'fileExtension', className: 'col-fileext'},
{data: 'fileSize', render: sizeAsMB()},
{data: 'createdAt', render: customDate()},
{data: 'expires'},
{data: 'ip', render: colouredIP(), className: 'col-ip'},
{data: 'expires', render: renderNullField()},
{data: 'mediaType', render: renderNullField()},
{data: 'originalFileName'},
{data: 'url'},
Expand Down

0 comments on commit f827b22

Please sign in to comment.