TeamFoundationFileService.UploadFile Method (TeamFoundationRequestContext, Int32%, Stream, array<Byte , Int64, Int64, Int64, CompressionType, OwnerId, String, Int32, Boolean)
Uploads the given file to the Blob Store
Namespace: Microsoft.TeamFoundation.Framework.Server
Assembly: Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)
Syntax
'Declaration
Public Function UploadFile ( _
requestContext As TeamFoundationRequestContext, _
ByRef fileId As Integer, _
content As Stream, _
hashValue As Byte(), _
compressedLength As Long, _
uncompressedLength As Long, _
offsetFrom As Long, _
compressionType As CompressionType, _
ownerId As OwnerId, _
fileName As String, _
relatedFileId As Integer, _
compressContent As Boolean _
) As Boolean
public bool UploadFile(
TeamFoundationRequestContext requestContext,
ref int fileId,
Stream content,
byte[] hashValue,
long compressedLength,
long uncompressedLength,
long offsetFrom,
CompressionType compressionType,
OwnerId ownerId,
string fileName,
int relatedFileId,
bool compressContent
)
public:
bool UploadFile(
TeamFoundationRequestContext^ requestContext,
int% fileId,
Stream^ content,
array<unsigned char>^ hashValue,
long long compressedLength,
long long uncompressedLength,
long long offsetFrom,
CompressionType compressionType,
OwnerId ownerId,
String^ fileName,
int relatedFileId,
bool compressContent
)
member UploadFile :
requestContext:TeamFoundationRequestContext *
fileId:int byref *
content:Stream *
hashValue:byte[] *
compressedLength:int64 *
uncompressedLength:int64 *
offsetFrom:int64 *
compressionType:CompressionType *
ownerId:OwnerId *
fileName:string *
relatedFileId:int *
compressContent:bool -> bool
public function UploadFile(
requestContext : TeamFoundationRequestContext,
fileId : int,
content : Stream,
hashValue : byte[],
compressedLength : long,
uncompressedLength : long,
offsetFrom : long,
compressionType : CompressionType,
ownerId : OwnerId,
fileName : String,
relatedFileId : int,
compressContent : boolean
) : boolean
Parameters
requestContext
Type: Microsoft.TeamFoundation.Framework.Server.TeamFoundationRequestContextSet compressContent to true to cause UploadFile to compress the content stream prior to uploading. If compression fails, or results in a larger file than the original, the file will be stored as uncompressed. Note: if compressContent is set to true, all other parameters should be set as though the stream was intended to be stored as uncompressed (ie, compressedLength and uncompressedLength are both set to content.Length).
- fileId
Type: System.Int32%
- content
Type: System.IO.Stream
- hashValue
Type: array<System.Byte[]
- compressedLength
Type: System.Int64
- uncompressedLength
Type: System.Int64
- offsetFrom
Type: System.Int64
- compressionType
Type: Microsoft.TeamFoundation.Framework.Server.CompressionType
- ownerId
Type: Microsoft.TeamFoundation.Framework.Server.OwnerId
- fileName
Type: System.String
- relatedFileId
Type: System.Int32
- compressContent
Type: System.Boolean
Return Value
Type: System.Boolean
true if upload is complete (i.e. this is the last chunk)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.