Example #1
0
        public EmoticonSaveStatus SaveEmoticonFile(int userID, Stream stream, string fileName, out string MD5, out string relativeUrl)
        {
            relativeUrl = "";
            MD5         = "";
            if (stream != null && stream.Length > 0)
            {
                byte[] fileData = new byte[stream.Length];

                MD5 = IOUtil.GetFileMD5Code(stream);

                stream.Seek(0, SeekOrigin.Begin);
                stream.Read(fileData, 0, fileData.Length);

                return(SaveEmoticonFile(userID, fileData, MD5, fileName, out relativeUrl));
            }
            return(EmoticonSaveStatus.Failed);
        }