Closed brankosekulic closed 9 years ago
This is also the case with any other file type
@natevw may be able to help out here.
Oy, this doesn't seem good. Have you been able to debug any further @brankosekulic and/or made sure it's not just a bad card?
I wonder if this reliably happens whenever you write a certain file size (regardless of content) or just something that happens from time to time but usually is okay? It's interesting that (unless Github did some of its own processing to your attachement) that it's not cut off exactly at a 512-byte boundary or anything like that.
@natevw card is good, it saves whole file with version 8.0.5
It always happens with each file size and type.
I am able to reproduce this by putting your good image above into a folder with test project and using this script to copy to card:
var tessel = require('tessel'),
builtin_fs = require('fs'),
sdlib = require("./");
builtin_fs.readFile("./sdcard-issues-21-complete.jpg", function (e,d) {
if (e) throw e;
else console.log("Opened file", d.length, "bytes");
sdlib.use(tessel.port['A'], {getFilesystems:true}, function (e,arr) {
if (e) throw e;
else card_fs = arr[0];
console.log("Got filesystem.");
card_fs.writeFile("sdcard-issues-21-copy_"+Date.now()+".jpg", d, function (e) {
if (e) throw e;
else console.log("Wrote file.");
});
});
});
This is due to https://github.com/tessel/runtime/issues/721
I've worked around the runtime/firmware issues and with sdcard@0.8.7 I am able to save files over 4KB again.
This is probably caused by switching to new version of fatfs:
version 0.8.6
version 0.8.5