Error loading document. Cant load empty file .txt

WebViewer Version:

Do you have an issue with a specific file(s)? Yes .txt
Can you reproduce using one of our samples or online demos? No
Are you using the WebViewer server? Yes
Does the issue only happen on certain browsers? No
Is your issue related to a front-end framework? Maybe
Is your issue related to annotations? No

Please give a brief summary of your issue:
Error loading document. cant load empty file .txt

Please describe your issue and provide steps to reproduce it:
I cant open empty file .txt but if its not empty file can be loaded

Please provide a link to a minimal sample where the issue is reproducible:
mydata.jaybod.com → create file .txt then open file

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

Hello Hanif,

Thank you for contacting WebViewer Forums.

Unfortunately, I am unable to signup with the provided site. Please provide the file as an attachment or drive link.

Regardless when creating an empty .txt file with MS Word, there were no issues viewing it in WebViewer. I have attached the file for your convenience.

WebViewer Server demo: https://docs.apryse.com/samples/web/samples/viewing/viewing-with-webviewer-server/

empty.txt (2 Bytes)

Regards,
Luke

I cannot attached the file that i already created through the website because it says 0 bytes, the method i used for creating the txt file is Buffer.alloc(0), assuming it’s an empty file, so is there any other method for creating the file or its sufficient to just used the buffer allocation?

Hello Hanif,

It may be expected that WebViewer cannot display zero-byte files. Zero-byte text file essentially means that the file is empty and contains no data to display or render. I was able to create one and display the same error.

Is there a specific workflow where you need to open this type of file?

Regards,
Luke