upload
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "Export.h"
|
||||
#include "DateTime.h"
|
||||
|
||||
class UNSWSC_DLL_EXPORT WebFileInfo
|
||||
{
|
||||
private:
|
||||
std::string OriginalFileName;
|
||||
std::string StorageFileName;
|
||||
std::string ExtensionName;
|
||||
DateTime UploadTime;
|
||||
size_t FileSize;
|
||||
|
||||
private:
|
||||
std::string GetRandomNumber();
|
||||
std::string GetExtension(std::string ofn);
|
||||
std::string GenerateStorageName(std::string ofn);
|
||||
|
||||
public:
|
||||
WebFileInfo() = default;
|
||||
WebFileInfo(std::string ofn, size_t size);
|
||||
WebFileInfo(std::string ofn, std::string sfn, std::string en, DateTime upt, size_t siz);
|
||||
WebFileInfo(const WebFileInfo& obj);
|
||||
|
||||
public:
|
||||
std::string MakePath(std::string storage_dir) const;
|
||||
std::string GetOriginalFileName() const;
|
||||
std::string GetStorageFileName() const;
|
||||
std::string GetExtensionName() const;
|
||||
DateTime GetUploadTime() const;
|
||||
size_t GetFileSize() const;
|
||||
};
|
||||
|
||||
using WebFileInfoVec = std::vector<WebFileInfo>;
|
||||
Reference in New Issue
Block a user