Skip to content

Commit

Permalink
Merge pull request #142 from TaetaetaE01/main
Browse files Browse the repository at this point in the history
[fix] : file update File엔티티 fileName 수정 안되는 거 수정
  • Loading branch information
TaetaetaE01 authored Oct 17, 2024
2 parents 5105eb5 + 4033dee commit 2d2fc07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ public class File extends BaseTimeEntity {
private CampusNotice campusNotice;


public void update(String url) {
public void update(String url, String fileName) {
this.url = url;
this.fileName = fileName;
}

public void linkMeeting(Meetings meetings) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ public List<File> updateFile(FileUpdateDTO fileUpdateDTO) {

multipartFileList.forEach(file -> {
String url = s3Util.uploadFile(file, fileType);
String fileName = file.getOriginalFilename();

files.forEach(fileEntity -> {
fileEntity.update(url);
fileEntity.update(url, fileName);
updatedFiles.add(fileEntity);
});
});
Expand Down

0 comments on commit 2d2fc07

Please sign in to comment.