public void GetFile()
        {
            string text  = (string)base.GetParameter("d");
            string text2 = (string)base.GetParameter("fileName");

            if (text == null || text2 == null)
            {
                throw new OwaInvalidRequestException("DocumentId or fileName does not exist");
            }
            base.DontWriteHeaders = true;
            Utilities.MakePageNoCacheNoStore(this.HttpContext.Response);
            if (text2.EndsWith(".css", StringComparison.OrdinalIgnoreCase))
            {
                this.HttpContext.Response.ContentType = Utilities.GetContentTypeString(OwaEventContentType.Css);
            }
            else
            {
                if (!text2.EndsWith(".jpg", StringComparison.OrdinalIgnoreCase))
                {
                    throw new OwaInvalidRequestException("Unsupported file type");
                }
                this.HttpContext.Response.ContentType = Utilities.GetContentTypeString(OwaEventContentType.Jpeg);
            }
            try
            {
                TranscodingTaskManager.TransmitFile(base.UserContext.Key.UserContextId, text, text2, this.HttpContext.Response);
            }
            catch (TranscodingFatalFaultException innerException)
            {
                throw new OwaInvalidRequestException("The TransmitFile function fails", innerException);
            }
        }