This commit is contained in:
parent
43a8ed472b
commit
62dae50d70
@ -41,9 +41,9 @@ func getFileStreamFromLink(file model.Obj, link *model.Link) (*model.FileStream,
|
|||||||
if link.Data != nil {
|
if link.Data != nil {
|
||||||
rc = link.Data
|
rc = link.Data
|
||||||
} else if link.FilePath != nil {
|
} else if link.FilePath != nil {
|
||||||
// copy a new temp, because will be deleted after upload
|
// create a new temp symbolic link, because it will be deleted after upload
|
||||||
newFilePath := stdpath.Join(conf.Conf.TempDir, fmt.Sprintf("%s-%s", uuid.NewString(), file.GetName()))
|
newFilePath := stdpath.Join(conf.Conf.TempDir, fmt.Sprintf("%s-%s", uuid.NewString(), file.GetName()))
|
||||||
err := utils.CopyFile(*link.FilePath, newFilePath)
|
err := os.Symlink(*link.FilePath, newFilePath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user