feat: update ppid data files services
This commit is contained in:
parent
65c6125649
commit
37882c3cbe
|
|
@ -110,6 +110,7 @@ func (_i *ppidDataFilesService) Save(c *fiber.Ctx) (err error) {
|
|||
defer src.Close()
|
||||
|
||||
filename := filepath.Base(file.Filename)
|
||||
filename = strings.ReplaceAll(filename, " ", "")
|
||||
filenameWithoutExt := filepath.Clean(filename[:len(filename)-len(filepath.Ext(filename))])
|
||||
extension := filepath.Ext(file.Filename)[1:]
|
||||
|
||||
|
|
@ -118,8 +119,8 @@ func (_i *ppidDataFilesService) Save(c *fiber.Ctx) (err error) {
|
|||
|
||||
newFilenameWithoutExt := filenameWithoutExt + "_" + strconv.Itoa(randUniqueId)
|
||||
newFilename := newFilenameWithoutExt + "." + extension
|
||||
|
||||
objectName := "ppid/upload/" + newFilename
|
||||
|
||||
size := strconv.FormatInt(file.Size, 10)
|
||||
statusId := 1
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue