Open emmanuelpineda opened 1 year ago
Hello @xiaoyu03,
We have a new problem with the method: insertFileFromBase64, it does not throw any error but does not insert the content, it worked well in the past days and now it is not working. Please we need your help, we have a large number of users (students) who use the Jasperactive Add In and are stuck when starting this new school year.
@emmanuelpineda review your base64 string, the behavior was the same here some weeks ago, but the guys fixed it recently
The real problem was:
Check this other issue, I detailed our working case (https://github.com/OfficeDev/office-js/issues/4682#issuecomment-2369243454)
Thank you for the info @knopmickael!, I'll check the Word document
Hi @emmanuelpineda,
May I know if the API works for you now? If not, could you share some failed samples with us to repro the issue?
Hi @xiaoyuMS , Actually now that you mention it, the insert does not always work for me either. Just tried to insert a relatively big word document into a content control and it briefly shows the "inserting" loading spinner, and then just doesn't do anything and these errors show up
@SirDavenport
This looks like a new issue. Did it continue to happen for particular insertion? If so, is it possible to provide the repro steps with us?
Without making any changes to the Add In code, the function context.document.body.insertFileFromBase64 stopped working about 2 weeks ago. I assume this is due to some Office API update.
Your Environment
Expected behavior
Calling the context.document.body.insertFileFromBase64(base64File, Word.InsertLocation.replace) function is expected to insert the content into the current document
Current behavior
The context.document.body.insertFileFromBase64(base64File, Word.InsertLocation.replace) function throws an error and does not insert the content
Steps to reproduce
Just call the function context.document.body.insertFileFromBase64(base64String, Word.InsertLocation.replace) from office on the web. Fails with any base 64 file string
Context
This function is useful for our learning project so that the user does not start from scratch to create a document
Useful logs