[GH-ISSUE #3] Does this mean OWA 2013 server wont support docx editing? #3

Open
opened 2026-02-27 09:14:48 +03:00 by kerem · 5 comments
Owner

Originally created by @joymon on GitHub (Apr 28, 2016).
Original GitHub issue: https://github.com/marx-yu/WopiHost/issues/3

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

Originally created by @joymon on GitHub (Apr 28, 2016). Original GitHub issue: https://github.com/marx-yu/WopiHost/issues/3 Sorry I didnt find any way to ask question except raising defect :(
Author
Owner

@petrsvihlik commented on GitHub (Apr 29, 2016):

OWA 2013 supports docx editing

<!-- gh-comment-id:215747768 --> @petrsvihlik commented on GitHub (Apr 29, 2016): OWA 2013 supports docx editing
Author
Owner

@joymon commented on GitHub (Jun 19, 2016):

Thanks for the response

<!-- gh-comment-id:226975942 --> @joymon commented on GitHub (Jun 19, 2016): Thanks for the response
Author
Owner

@huanbd commented on GitHub (Dec 29, 2016):

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

<!-- gh-comment-id:269661625 --> @huanbd commented on GitHub (Dec 29, 2016): 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
Author
Owner

@marx-yu commented on GitHub (Dec 30, 2016):

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

<!-- gh-comment-id:269742762 --> @marx-yu commented on GitHub (Dec 30, 2016): If you use owas 2013, you should use the code branch of release_0.8_for_owa2013. Branch master is match with oos 2016
Author
Owner

@huanbd commented on GitHub (Dec 31, 2016):

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;
    }
<!-- gh-comment-id:269858277 --> @huanbd commented on GitHub (Dec 31, 2016): 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; }
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WopiHost-marx-yu#3
No description provided.