Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Uploading from std::istream. #39

@andrewerf

Description

@andrewerf

The CFTPClient missing ability to upload data stored in memory. My proposal is the following: extend the CFTPClient with public methods:

  1. bool UploadFile(read_callback_t read_callback, void* userData, const std::string &strRemoteFile, const bool &bCreateDir = false) const;
  2. bool UploadFile(std::istream &isData, const std::string &strRemoteFile, const bool &bCreateDir = false) const;

First one correspond to CURLOPT_READFUNCTION and second one is useful wrapper for std::istream. Implementation of
bool UploadFile(const std::string &strLocalFile, const std::string &strRemoteFile, const bool &bCreateDir = false) const; could be updated therefore to open strLocalFile with std::ifstream and call overload 2).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions