mirror of
https://github.com/NixOS/nix
synced 2025-06-25 10:41:16 +02:00
S3BinaryCacheStore: Set Content-Type
This is necessary for serving log files to browsers.
This commit is contained in:
parent
8b1d65bebe
commit
45c70382ac
5 changed files with 25 additions and 13 deletions
|
@ -30,7 +30,9 @@ protected:
|
|||
|
||||
bool fileExists(const std::string & path) override;
|
||||
|
||||
void upsertFile(const std::string & path, const std::string & data) override;
|
||||
void upsertFile(const std::string & path,
|
||||
const std::string & data,
|
||||
const std::string & mimeType) override;
|
||||
|
||||
void getFile(const std::string & path,
|
||||
std::function<void(std::shared_ptr<std::string>)> success,
|
||||
|
@ -83,7 +85,9 @@ bool LocalBinaryCacheStore::fileExists(const std::string & path)
|
|||
return pathExists(binaryCacheDir + "/" + path);
|
||||
}
|
||||
|
||||
void LocalBinaryCacheStore::upsertFile(const std::string & path, const std::string & data)
|
||||
void LocalBinaryCacheStore::upsertFile(const std::string & path,
|
||||
const std::string & data,
|
||||
const std::string & mimeType)
|
||||
{
|
||||
atomicWrite(binaryCacheDir + "/" + path, data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue