TooB ML support for large model. .zip file uploads.

This commit is contained in:
Robin Davies
2024-08-17 23:09:04 -04:00
parent 7bd4479bda
commit 1f95908d34
22 changed files with 845 additions and 530 deletions
+2 -6
View File
@@ -1680,18 +1680,14 @@ std::filesystem::path Storage::MakeUserFilePath(const std::string &directory, co
{
if (!ensureNoDotDot(directory))
{
throw std::logic_error("Permission denied.");
throw std::logic_error(SS("Invalide filename: " << filename));
}
std::filesystem::path filePath{filename};
if (filePath.has_parent_path())
{
throw std::logic_error("Permission denied.");
}
std::filesystem::path result = this->GetPluginUploadDirectory() / directory / filename;
if (!this->IsValidSampleFileName(result))
{
throw std::logic_error("Permission denied.");
throw std::logic_error(SS("Invalid upload path: " << result));
}
return result;
}