HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
NET_HTTPUploadedFile Class Reference

#include <NET_HTTPUploadedFile.h>

Classes

class  IStream
 Read data from an uploaded file. More...
 

Public Types

enum  SentinelType { SENTINEL }
 

Public Member Functions

 NET_HTTPUploadedFile ()
 
 NET_HTTPUploadedFile (const UT_StringRef &name)
 
 NET_HTTPUploadedFile (SentinelType)
 
 ~NET_HTTPUploadedFile ()
 
 NET_HTTPUploadedFile (NET_HTTPUploadedFile &&)=default
 
NET_HTTPUploadedFileoperator= (NET_HTTPUploadedFile &&)=default
 
SYS_FORCE_INLINE const
UT_StringHolder
name () const
 The name of the file found in the Content-Disposition header. More...
 
SYS_FORCE_INLINE int64 size () const
 The size of the file. More...
 
SYS_FORCE_INLINE const
UT_StringHolder
contentType () const
 The content type of the file. More...
 
const UT_StringHolderfileLocation () const
 
SYS_FORCE_INLINE bool isInMemory () const
 Is this file in memory or stored on disk. More...
 
void forceToStorage ()
 
bool multipleChunks (int64 chunk_size=-1) const
 
void removeTempFile ()
 Remove the temp file. This does nothing if the file is in memory. More...
 
SYS_FORCE_INLINE void makeSentinel ()
 
SYS_FORCE_INLINE bool isSentinel () const
 
void setMaxInMemorySize (int64 max_size)
 

Static Public Attributes

static constexpr int64 DefaultMaxInMemorySize = 2500000
 

Friends

class NET_HttpIO
 

Detailed Description

Definition at line 26 of file NET_HTTPUploadedFile.h.

Member Enumeration Documentation

Enumerator
SENTINEL 

Definition at line 31 of file NET_HTTPUploadedFile.h.

Constructor & Destructor Documentation

NET_HTTPUploadedFile::NET_HTTPUploadedFile ( )
NET_HTTPUploadedFile::NET_HTTPUploadedFile ( const UT_StringRef name)
NET_HTTPUploadedFile::NET_HTTPUploadedFile ( SentinelType  )
inline

Definition at line 38 of file NET_HTTPUploadedFile.h.

NET_HTTPUploadedFile::~NET_HTTPUploadedFile ( )
NET_HTTPUploadedFile::NET_HTTPUploadedFile ( NET_HTTPUploadedFile &&  )
default

Member Function Documentation

SYS_FORCE_INLINE const UT_StringHolder& NET_HTTPUploadedFile::contentType ( ) const
inline

The content type of the file.

Definition at line 62 of file NET_HTTPUploadedFile.h.

const UT_StringHolder& NET_HTTPUploadedFile::fileLocation ( ) const
inline

The temp file location. This is only filled out if isInMemory() return false

Definition at line 68 of file NET_HTTPUploadedFile.h.

void NET_HTTPUploadedFile::forceToStorage ( )
SYS_FORCE_INLINE bool NET_HTTPUploadedFile::isInMemory ( ) const
inline

Is this file in memory or stored on disk.

Definition at line 71 of file NET_HTTPUploadedFile.h.

SYS_FORCE_INLINE bool NET_HTTPUploadedFile::isSentinel ( ) const
inline

Definition at line 97 of file NET_HTTPUploadedFile.h.

SYS_FORCE_INLINE void NET_HTTPUploadedFile::makeSentinel ( )
inline

Definition at line 87 of file NET_HTTPUploadedFile.h.

bool NET_HTTPUploadedFile::multipleChunks ( int64  chunk_size = -1) const

Determine if the file needs to be read in multiple chunks. This is useful to determining if you can perform read() safeully. Default uses the servers max size of 2.5MB

SYS_FORCE_INLINE const UT_StringHolder& NET_HTTPUploadedFile::name ( ) const
inline

The name of the file found in the Content-Disposition header.

Definition at line 58 of file NET_HTTPUploadedFile.h.

NET_HTTPUploadedFile& NET_HTTPUploadedFile::operator= ( NET_HTTPUploadedFile &&  )
default
void NET_HTTPUploadedFile::removeTempFile ( )

Remove the temp file. This does nothing if the file is in memory.

void NET_HTTPUploadedFile::setMaxInMemorySize ( int64  max_size)
inline

Definition at line 103 of file NET_HTTPUploadedFile.h.

SYS_FORCE_INLINE int64 NET_HTTPUploadedFile::size ( void  ) const
inline

The size of the file.

Definition at line 60 of file NET_HTTPUploadedFile.h.

Friends And Related Function Documentation

friend class NET_HttpIO
friend

Definition at line 135 of file NET_HTTPUploadedFile.h.

Member Data Documentation

constexpr int64 NET_HTTPUploadedFile::DefaultMaxInMemorySize = 2500000
static

Definition at line 29 of file NET_HTTPUploadedFile.h.


The documentation for this class was generated from the following file: