Skip to content

Commit 0f1c31d

Browse files
authored
Blob translation
1 parent c96240d commit 0f1c31d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

4-binary/03-blob/article.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@ link.href = URL.createObjectURL(blob);
7373
</script>
7474
```
7575

76-
We can also create a link dynamically in JavaScript and simulate a click by `link.click()`, then download starts automatically.
76+
Aynı zamanda JavaScript'te bir link yaratabilir ve tıklama eylemini `link.click()` ile simüle edebiliriz, ardından indirme otomatik olarak başlayacaktır.
7777

78-
Here's the similar code that causes user to download the dynamicallly created Blob, without any HTML:
78+
Aşağıda hiç HTML içermeden kullanıcının yaratılmış bir Blob'u otomatik olarak indirmesini sağlayacak bir kod yer alıyor:
7979

8080
```js run
8181
let link = document.createElement('a');
82-
link.download = 'hello.txt';
82+
link.download = 'merhaba.txt';
8383

84-
let blob = new Blob(['Hello, world!'], {type: 'text/plain'});
84+
let blob = new Blob(['Merhaba Dünya!'], {type: 'text/plain'});
8585

8686
link.href = URL.createObjectURL(blob);
8787

@@ -90,19 +90,19 @@ link.click();
9090
URL.revokeObjectURL(link.href);
9191
```
9292

93-
`URL.createObjectURL` takes a blob and creates an unique URL for it, in the form `blob:<origin>/<uuid>`.
93+
`URL.createObjectURL`, bir blob'u alır ve ondan `blob:<kaynak>:<uuid>` formatında benzersiz bir URL oluşturur.
9494

95-
That's what the value of `link.href` looks like:
95+
`link.href`in değeri şunun gibi olacaktır:
9696

9797
```
98-
blob:https://javascript.info/1e67e00e-860d-40a5-89ae-6ab0cbee6273
98+
blob:https://tr.javascript.info/1e67e00e-860d-40a5-89ae-6ab0cbee6273
9999
```
100100

101-
The browser for each url generated by `URL.createObjectURL` stores an the url -> blob mapping internally. So such urls are short, but allow to access the blob.
101+
`URL.createObjectURL` ile oluşturulmuş her bir URL'in tarayıcısı, url -> blob iç adreslemesini barındırır. Bu nedenle URL'ler kısadır fakat blob'a erişmeye izin verir.
102102

103-
A generated url (and hence the link with it) is only valid within the current document, while it's open. And it allows to reference the blob in `<img>`, `<a>`, basically any other object that expects an url.
103+
Oluşturulmuş URL (ve dolayısıyla onunla bağlantılı link) yalnızca içinde bulunduğu mevcut belge için, açık olduğu sürece geçerlidir ve `<img>`, `<a>` gibi, bir URL bekleyen herhangi bir objedeki blob'u göstermeyi sağlar.
104104

105-
There's a side-effect though. While there's an mapping for a blob, the blob itself resides in the memory. The browser can't free it.
105+
Ancak burada bir yan etki vardır. Bir blob adreslendiğinde blob'un kendisi hafızada bulunur. Tarayıcı onu hafızadan silemez.
106106

107107
The mapping is automatically cleared on document unload, so blobs are freed then. But if an app is long-living, then that doesn't happen soon.
108108

0 commit comments

Comments
 (0)