package file

import (
	

	
	
	
	
	
)

func (, , ,  string) (string, error) {
	,  := liman.GetServer(&models.Server{ID: })
	if  != nil {
		return "", 
	}

	,  := bridge.GetSession(
		,
		.ID,
		.IPAddress,
	)
	if  != nil {
		return "", 
	}

	 := .CreateFileConnection(
		,
		.ID,
		.IPAddress,
	)
	if ! {
		return "", logger.FiberError(fiber.StatusServiceUnavailable, "cannot establish file connection")
	}

	 := ""
	if .Os == "linux" {
		 = "/tmp/" + filepath.Base()
	} else {
		 = .WindowsPath + 
	}

	 = .Put(, )
	if  != nil {
		return "", 
	}
	return , nil
}