コード例 #1
0
        /// <summary>
        /// Gets the post back value.
        /// </summary>
        public RsFile GetPostBackValue( PostBackValueDictionary postBackValues )
        {
            if( postBackValue == null ) {
                var value = formValue.GetValue( postBackValues );
                if( value == null )
                    return null;

                using( var ms = new MemoryStream() ) {
                    value.InputStream.CopyTo( ms );
                    postBackValue = new RsFile( ms.ToArray(), Path.GetFileName( value.FileName ), contentType: value.ContentType );
                }
            }
            return postBackValue;
        }
コード例 #2
0
 /// <summary>
 /// Returns the content type of the given HttpPostedFile.
 /// </summary>
 // This implementation simply returns the media type provided by the client, which makes it vulnerable to spoofing. The only way around this is to determine
 // the media type by looking at the contents of the file.
 internal static string GetContentTypeForPostedFile( RsFile file )
 {
     return file.ContentType;
 }
コード例 #3
0
 public static string HandleUploadedFiles( string fileUploaderIdentifier, string parameters, RsFile file )
 {
     return "";
 }