-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VirtualFS not storing files correctly. #34
Comments
It appears that VirtualFS encounters issues with non-UTF-8 encoding. As a result, it replaces such files with UTF-8 replacement characters, represented as 0xEF 0xBF 0xBD in hexadecimal. To address this, it's advisable to first convert these files to UTF-8 encoding before uploading them to VirtualFS. |
VirtualFS should be used for storing text as it uses JSON strings for file content. Please use UTF-8 as per the JSON string requirements. Large files will use Blobs to store binary content which is how the file system handles larger binary files such as images, audio, and video. Large binary files should store fine if they are saved as a Blob. Lines 197 to 208 in 43ac095
|
A potential solution could be in the file manager when uploading files, checking if the MIME type is not text other than checking if it is an image, video, etc. pluto/pkgs/apps/FileManager.js Lines 167 to 171 in 43ac095
|
Binary file upload was only originally intended for uploading those file types, as binary files were never tested |
I'll give it a test locally. |
Check #35 for info on changes |
VirtualFS reacts badly to files that are not UTF-8 encoded.
Example:
Upload a file containing one byte
0x98
.Download the file again and view in hex editor.
The file now contains
0xEFBFBD
The text was updated successfully, but these errors were encountered: