// Store puts an `ExportResult` struct to an DropboxFolder within the specified directory
Store puts an `ExportResult` struct to an DropboxFolder within the specified directory
// Store puts an ` ExportResult ` struct to an DropboxFolder within the specified directory
func (d *Dropbox) Store(result *ExportResult, destination string) *Error {
	if result.Error != nil {
		return result.Error
	}
	file, err := os.Open(result.Path)
	if err != nil {
		return makeErr(err, "")
	}
	defer file.Close()
	client := dropy.New(dropbox.New(dropbox.NewConfig(d.AccessToken)))
	err = client.Upload(destination, file)
	if err != nil {
		return makeErr(err, "")
	}
	return makeErr(nil, "")
}
func ( d * Dropbox ) Store ( result * ExportResult , destination string ) * Error { if result . Error != nil { return result . Error } file , err := os . Open ( result . Path ) if err != nil { return makeErr ( err , " " ) } defer file . Close ( ) client := dropy . New ( dropbox . New ( dropbox . NewConfig ( d . AccessToken ) ) ) err = client . Upload ( destination , file ) if err != nil { return makeErr ( err , " " ) } return makeErr ( nil , " " ) }
Store puts an `ExportResult` struct to an DropboxFolder within the specified directory
Store puts an ` ExportResult ` struct to an DropboxFolder within the specified directory