Beispiel #1
0
        static void CometWorker_FileUploadRequested(ref HttpFile file)
        {
            string fileName = file.ServerMapPath + "\\Upload\\" + file.FileName;

            file.SaveAs(fileName);
            string resourceName = file.FileName.Replace("&", "_");

            ResourceManager.AddReplaceResource(fileName, resourceName, ResourceType.Image, file.ClientId);
            CometWorker.SendToClient(file.ClientId, JSON.Method("ShowImage", resourceName));
        }