{"id":2226,"date":"2022-11-03T17:03:27","date_gmt":"2022-11-03T08:03:27","guid":{"rendered":"http:\/\/www.agile-software.site\/?p=2226"},"modified":"2022-11-03T17:03:27","modified_gmt":"2022-11-03T08:03:27","slug":"url-createobjecturl","status":"publish","type":"post","link":"https:\/\/agile-software.net\/?p=2226","title":{"rendered":"URL.createObjectURL()"},"content":{"rendered":"\n<p><strong><code>URL.createObjectURL()<\/code><\/strong>\u00a0\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u3059 URL \u3092\u542b\u3080\u00a0<a href=\"https:\/\/developer.mozilla.org\/ja\/docs\/Glossary\/String\"><code>DOMString<\/code><\/a>\u00a0\u3092\u751f\u6210\u3057\u307e\u3059<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u306e\u4f5c\u6210<\/h2>\n\n\n\n<p>File API\u306a\u3069\u3067\u53d6\u5f97\u3057\u305fFile\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u3001\u6b21\u306e\u3088\u3046\u306bURL.createObjectURL()\u306e\u5f15\u6570\u306b\u6e21\u3059\u3068\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>const objectUrl = URL.createObjectURL( obj );<\/code><\/pre><\/div>\n\n\n\n<p>\u53d6\u5f97\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u306f\u3001\u6b21\u306e\u3088\u3046\u306a&#8221;blob:&#8221;\u3067\u59cb\u307e\u308b\u6587\u5b57\u5217\u3067\u3059\u3002<\/p>\n\n\n\n<p><strong>&#8220;blob:null\/f79b06de-2072-4fe4-bb2b-a89383231a79&#8221;<\/strong><\/p>\n\n\n\n<p>\u5f8c\u308d\u306b\u7d9a\u304f\u6587\u5b57\u5217\u306f\u3001createObjectURL()\u304c\u547c\u3073\u51fa\u3055\u308c\u305f\u6642\u306b\u4ed6\u3068\u91cd\u8907\u3057\u306a\u3044\u3088\u3046\u306b\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<br>\u3053\u306e\u3068\u304d\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u540c\u4e00\u78ba\u8a8d\u3092\u3057\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u540c\u3058\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3082\u547c\u3073\u51fa\u3059\u305f\u3073\u306b\u7570\u306a\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u304c\u4f5c\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p>Blob\u304b\u3089\u4f5c\u6210\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u306f\u3001Blob URL\u30b9\u30c8\u30a2\u306bBlob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167\u3068\u30da\u30a2\u3067\u683c\u7d0d\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-plain\"><code>Blob URL\u30b9\u30c8\u30a2:{\n    Blob URL1:{ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL , Blob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167 }\n    Blob URL2:{ \u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL , Blob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167 }\n   \u30fb\u30fb\u30fb\u30fb\n}<\/code><\/pre><\/div>\n\n\n\n<p>URL\u306e\u53c2\u7167\u884c\u70ba\u3001\u4f8b\u3048\u3070img\u30bf\u30b0\u306esrc\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u304c\u30bb\u30c3\u30c8\u3055\u308c\u308b\u3068\u3001Blob URL\u30b9\u30c8\u30a2\u304b\u3089\u4e00\u81f4\u3059\u308b\u3082\u306e\u3092\u691c\u7d22\u3057\u3066Blob\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304b\u3089\u3001\u30c7\u30fc\u30bf\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>URL.createObjectURL()\u00a0\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306f\u3001\u5f15\u6570\u3067\u6307\u5b9a\u3055\u308c\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u8868\u3059 URL \u3092\u542b\u3080\u00a0DOMString\u00a0\u3092\u751f\u6210\u3057\u307e\u3059 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8URL\u306e\u4f5c\u6210 File API\u306a\u3069\u3067\u53d6\u5f97\u3057\u305fFile\u30aa\u30d6\u30b8\u30a7\u30af<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jin_ogp_image_url":"","_jin_last_featured_id":0,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-2226","post","type-post","status-publish","format-standard","hentry","category-javascript"],"_links":{"self":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2226"}],"version-history":[{"count":1,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2226\/revisions"}],"predecessor-version":[{"id":2227,"href":"https:\/\/agile-software.net\/index.php?rest_route=\/wp\/v2\/posts\/2226\/revisions\/2227"}],"wp:attachment":[{"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/agile-software.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}