Files
winix/functions/upload.h
Tomasz Sowa 39923d6617 fixed: UGContainer<Type> used a std::vector<Type> and when a new item was inserted
then current iterators (and pointers) were invalidated
         now we are using std::vector<Type*>
         this caused some crashes when a new user was added by 'adduser' winix function
added:   plugin 'export' is able to upload files on a remote server now
         (not finished yet)
changed: Thumb class is now called: Image
         and we are able to resize images too
         (some new options in the config and in mount points)
added:   some new plugin messages



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@764 e52654a7-88a9-db11-a3e9-0013d4bc506e
2011-09-13 06:08:34 +00:00

52 lines
863 B
C++
Executable File

/*
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010, Tomasz Sowa
* All rights reserved.
*
*/
#ifndef headerfile_winix_functions_upload
#define headerfile_winix_functions_upload
#include "functionbase.h"
namespace Fun
{
class Upload : public FunctionBase
{
public:
Upload();
bool HasAccess();
void MakePost();
void MakeGet();
void UploadFile(Item & item, const std::wstring & tmp_filename);
private:
std::wstring path;
std::string patha, path_thumba;
DbItemQuery query;
bool is_jquery_upload;
bool HasAccess(const Item & item);
bool UploadSaveStaticFile(const Item & item, const std::wstring & tmp_filename);
bool FunUploadCheckAbuse();
void UploadMulti();
void UploadSingle();
void ResizeImage(Item & item);
void CreateThumb(Item & item);
void CreateJSON();
};
} // namespace
#endif