aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/file.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/file.rs')
-rw-r--r--components/script/dom/file.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/components/script/dom/file.rs b/components/script/dom/file.rs
index 4528a116e45..f9b181dbf1a 100644
--- a/components/script/dom/file.rs
+++ b/components/script/dom/file.rs
@@ -73,7 +73,10 @@ impl File {
let ref typeString = blobPropertyBag.type_;
let modified = filePropertyBag.lastModified;
- Ok(File::new(global, BlobImpl::new_from_bytes(bytes), filename, modified, typeString))
+ // NOTE: Following behaviour might be removed in future,
+ // see https://github.com/w3c/FileAPI/issues/41
+ let replaced_filename = DOMString::from_string(filename.replace("/", ":"));
+ Ok(File::new(global, BlobImpl::new_from_bytes(bytes), replaced_filename, modified, typeString))
}
pub fn name(&self) -> &DOMString {