File class

Class file is designed for working with files. Objects of this class can be created by different means:
1.   by means of method POST through form field  
   <form method="post" enctype="multipart/form-data">  
   <input name="photo" type="file">.  
2.   by one of constructors of class file.  

While sending files to client (for example, by method
mail:send or through field response:body) one should define HTTP-header content-type. Parser determines file type by its extension with the help of table MIME-TYPES, defined in Configuration method (see also Chapter Installing and configuring Parser). Parser uses it to automatically determine, by file extension, the type of content to be sent in header content-type. If type of content cannot be determined, content-type will be application/octet-stream.

Copyright © 1997–2021 Art. Lebedev Studio | Last updated: 24.12.2004