// copy a local file to the bucket
copy a local file to the bucket
// copy a local file to the bucket
func cmdRawUp(cobraCmd *cobra.Command, args []string) error {
	local := args[0]
	remote := args[1]
	conf, err := loadConfig(configFile)
	if err != nil {
		return err
	}
	sess := awsSession(conf.AWS)
	localBytes, err := ioutil.ReadFile(local)
	if err != nil {
		return err
	}
	dir := filepath.Dir(remote)
	fileName := filepath.Base(remote)
	if err := awsUpload(sess, conf.AWS, dir, fileName, localBytes); err != nil {
		return err
	}
	return nil
}
func cmdRawUp ( cobraCmd * cobra . Command , args [ ] string ) error { local := args [ 0 ] remote := args [ 1 ] conf , err := loadConfig ( configFile ) if err != nil { return err } sess := awsSession ( conf . AWS ) localBytes , err := ioutil . ReadFile ( local ) if err != nil { return err } dir := filepath . Dir ( remote ) fileName := filepath . Base ( remote ) if err := awsUpload ( sess , conf . AWS , dir , fileName , localBytes ) ; err != nil { return err } return nil }
copy a local file to the bucket
copy a local file to the bucket
// read the local file // upload it