cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
948
Views
0
Helpful
0
Replies

Upload prompt to UCCX with C# REST Api

M_skovborg
Level 1
Level 1

sit with a huge problem, it is not possible for me to figure out how to upload a prompt to uccx.
I can upload to the Temp folder, but not figure out how I move the file to.
Is there one in this world as it actually manages to make a C # function that can do this?

 WebClient WebClient = new WebClient ();
            webclient.Credentials = new NetworkCredential ( "Administrator", "mypassword");
            byte [] array = webclient.UploadFile response ( "http://10.6.128.202/adminapi/prompt/uploadFile/", pathToFile);
            
            Console.WriteLine (System.Text.Encoding.ASCII.GetString (array response));


            string xml = "<Files xmlns: xsi = 'http: //www.w3.org/2001/XMLSchema-instance' xsi: noNamespaceSchemaLocation = 'Files.xsd'><Prompt><File><path>/en_US/myFolder/</path><FileName>SB1.wav</FileName></File></Prompt></Files>";
            string response = webclient.UploadString ( "http://10.6.128.202/adminapi/prompt/'/en_US/myFolder/ '" xml);
            Console.WriteLine (response);

Br,
Morten Skovborg

0 Replies 0