added: setting a correct mime type for static files - using magic library
added: std::wstring file_mime_type to ItemContent - a mime type for static file added: Header (core/header.h) - there will be header names defined, at the moment only content_type added: FuncionsBase::Finish() - it is called at the end when the winix finishes
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define headerfile_winix_functions_upload
|
||||
|
||||
#include "functionbase.h"
|
||||
#include <magic.h>
|
||||
|
||||
|
||||
namespace Winix
|
||||
@@ -61,8 +62,10 @@ private:
|
||||
std::wstring path;
|
||||
//DbItemQuery query;
|
||||
bool is_jquery_upload;
|
||||
magic_t magic_cookie;
|
||||
|
||||
void Init();
|
||||
void Finish();
|
||||
|
||||
bool HasAccess(const Item & item);
|
||||
bool UploadSaveStaticFile(const Item & item, const std::wstring & tmp_filename);
|
||||
@@ -72,6 +75,12 @@ private:
|
||||
void ResizeImage(Item & item);
|
||||
void CreateThumb(Item & item);
|
||||
void CreateAnswer();
|
||||
|
||||
void InitMagicLibIfNeeded();
|
||||
void CloseMagicLib();
|
||||
void AnalizeFileType(const std::wstring & file_path, std::wstring & file_type);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user