We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 265b69b commit e371a65Copy full SHA for e371a65
1 file changed
src/datasets.rs
@@ -178,9 +178,10 @@ fn upload_from_file(
178
};
179
180
let ft = detect_from_path(path).unwrap_or_else(|| {
181
- use std::io::Read;
+ use std::io::{Read, Seek};
182
let mut probe = [0u8; 512];
183
let n = f.read(&mut probe).unwrap_or(0);
184
+ let _ = f.seek(std::io::SeekFrom::Start(0));
185
detect_from_bytes(&probe[..n])
186
});
187
0 commit comments