Ejemplo n.º 1
0
func GetFile(local_path, listener string, uid, gid int, perms string) error {
	setStorageEngine(listener)
	err := storage.Download(utils.GetRelativeUploadPath(listener, local_path), local_path, uid, gid, perms, listener)
	if err != nil {
		log.Infof("Error downloading file from S3 (%s) : %+v", err.Error(), err)
	}
	return err
}
Ejemplo n.º 2
0
func RemoveFile(local_path, listener string) bool {
	setStorageEngine(listener)
	return storage.Remove(utils.GetRelativeUploadPath(listener, local_path))
}
Ejemplo n.º 3
0
func PutFile(local_path, listener string) error {
	setStorageEngine(listener)
	return storage.Upload(local_path, utils.GetRelativeUploadPath(listener, local_path))
}