Files
linux-packaging-mono/mcs/class/System.Web/Documentation/en/System.Web/HttpPostedFile.xml
Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

137 lines
7.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Type Name="HttpPostedFile" FullName="System.Web.HttpPostedFile">
<TypeSignature Language="C#" Value="public sealed class HttpPostedFile" Maintainer="auto" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyPublicKey>
</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the &lt;link location="node:gtk-sharp/programming/threads"&gt;Gtk# Thread Programming&lt;/link&gt; for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Web.HttpFileCollection" /> class provides access to all the files that are uploaded from a client as a file collection. The <see cref="T:System.Web.HttpPostedFile" /> class provides properties and methods to get information about an individual file and to read and save the file. </para>
<para>The <see cref="T:System.Web.UI.HtmlControls.HtmlInputFile" /> control can be used to select and upload files from a client.</para>
<para>Files are uploaded in MIME multipart/form-data format. By default, all requests, including form fields and uploaded files, larger than 256 KB are buffered to disk, rather than held in server memory.</para>
<para>You can specify the maximum allowable request size by accessing the <see cref="P:System.Web.Configuration.HttpRuntimeSection.MaxRequestLength" /> property or by setting the maxRequestLength attribute of the <format type="text/html"><a href="e9b81350-8aaf-47cc-9843-5f7d0c59f369">httpRuntime Element (ASP.NET Settings Schema)</a></format> element within the Machine.config or Web.config file. The default is 4 MB.</para>
<para>The amount of data that is buffered in server memory for a request, which includes file uploads, can be specified by accessing the <see cref="P:System.Web.Configuration.HttpRuntimeSection.RequestLengthDiskThreshold" /> property or by setting the requestLengthDiskThreshold attribute of the <format type="text/html"><a href="e9b81350-8aaf-47cc-9843-5f7d0c59f369">httpRuntime Element (ASP.NET Settings Schema)</a></format> element within the Machine.config or Web.config file.</para>
<para>By adjusting the <see cref="P:System.Web.Configuration.HttpRuntimeSection.MaxRequestLength" /> and <see cref="P:System.Web.Configuration.HttpRuntimeSection.RequestLengthDiskThreshold" /> properties, you can fine tune the performance of your server. Additionally, you should consider setting the <see cref="P:System.Web.Configuration.HttpRuntimeSection.MaxRequestLength" /> to prevent denial of service attacks caused by users posting large files to the server.</para>
<para>Server resources that are allocated to buffer the uploaded file will be destroyed when the request ends. To save a durable copy of the file, use the <see cref="M:System.Web.HttpPostedFile.SaveAs(System.String)" /> method.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides access to individual files that have been uploaded by a client.</para>
</summary>
</Docs>
<Members>
<Member MemberName="ContentLength">
<MemberSignature Language="C#" Value="public int ContentLength { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'int'</value>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the size of an uploaded file, in bytes.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="ContentType">
<MemberSignature Language="C#" Value="public string ContentType { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'string'</value>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the MIME content type of a file sent by a client.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="FileName">
<MemberSignature Language="C#" Value="public string FileName { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'string'</value>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the fully qualified name of the file on the client.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="InputStream">
<MemberSignature Language="C#" Value="public System.IO.Stream InputStream { get; }" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.IO.Stream</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<value>a <see cref="T:System.IO.Stream" /></value>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets a <see cref="T:System.IO.Stream" /> object that points to an uploaded file to prepare for reading the contents of the file.</para>
</summary>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
<Member MemberName="SaveAs">
<MemberSignature Language="C#" Value="public void SaveAs (string filename);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="filename" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The maximum size allowed for a request, which includes uploaded files, is 4 MB, by default. Maximum request size can be specified in the Machine.config or Web.config file in the maxRequestLength attribute of the <format type="text/html"><a href="e9b81350-8aaf-47cc-9843-5f7d0c59f369">httpRuntime Element (ASP.NET Settings Schema)</a></format> element. The maximum request size for a specific page can be specified using the <format type="text/html"><a href="922ef7d5-da38-4661-b1c6-5b9e5ceda1d5">location Element (ASP.NET Settings Schema)</a></format> element in a Web.config file.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Saves the contents of an uploaded file.</para>
</summary>
<param name="filename">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the saved file. </param>
</Docs>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
</AssemblyInfo>
</Member>
</Members>
</Type>