WopiHost icon indicating copy to clipboard operation
WopiHost copied to clipboard

Does this mean OWA 2013 server wont support docx editing?

Open joymon opened this issue 8 years ago • 5 comments

Sorry I didnt find any way to ask question except raising defect :(

joymon avatar Apr 28 '16 21:04 joymon

OWA 2013 supports docx editing

petrsvihlik avatar Apr 29 '16 15:04 petrsvihlik

Thanks for the response

joymon avatar Jun 19 '16 02:06 joymon

Hi, I use this project and owa 2003, to open and edit office file I can open/edit exel, ppt, but only open word can't edit word Can you show me the problems?

Thank you

huanbd avatar Dec 29 '16 17:12 huanbd

If you use owas 2013, you should use the code branch of release_0.8_for_owa2013. Branch master is match with oos 2016

marx-yu avatar Dec 30 '16 07:12 marx-yu

Hi marx-yu, I've already got branch, and completely run with owa 2013 in your sample project, But I've got an error when use in my project web api I realize that the difference is when response data in post method I haven't found the solution yet So, I keep my problem in this issues thread, hope you can help me to find problems

Code in my project: private HttpResponseMessage GetFile(string id) { var editSession = GetSession(id);

        //cobalt, for docx and pptx
        var ms = new MemoryStream();
        HttpContext.Current.Request.InputStream.CopyTo(ms);
        AtomFromByteArray atomRequest = new AtomFromByteArray(ms.ToArray());
        RequestBatch requestBatch = new RequestBatch();

        Object ctx;
        ProtocolVersion protocolVersion;

        requestBatch.DeserializeInputFromProtocol(atomRequest, out ctx, out protocolVersion);
        editSession.ExecuteRequestBatch(requestBatch);

        foreach (Request request in requestBatch.Requests)
        {
            if (request.GetType() == typeof(PutChangesRequest) && request.PartitionId == FilePartitionId.Content)
            {
                //upload file to hdfs
                editSession.Save();
            }
        }
        var response = requestBatch.SerializeOutputToProtocol(protocolVersion);

        var responseMessage = new HttpResponseMessage(HttpStatusCode.OK);
        Stream stream = new MemoryStream();
        response.CopyTo(stream);

        responseMessage.Content = new StreamContent(stream);
        responseMessage.Content.Headers.Add("X-WOPI-CorellationID", HttpContext.Current.Request.Headers["X-WOPI-CorrelationID"]);
        responseMessage.Content.Headers.Add("request-id", HttpContext.Current.Request.Headers["X-WOPI-CorrelationID"]);
        responseMessage.Content.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
        responseMessage.Content.Headers.ContentLength = stream.Length;

        return responseMessage;
    }

huanbd avatar Dec 31 '16 10:12 huanbd