FileReader.result

FileReader.result

该属性返回文件的内容。此属性仅在读取操作完成后才有效,并且数据的格式取决于用于启动读取操作的方法。FileReader]**result**

句法

var file = instanceOfFileReader .result

适当的字符串或ArrayBuffer]基于哪种读取方法来启动读取操作。该值是null读数是否尚未完成或未成功。

结果类型如下所述。

方法 描述
readAsArrayBuffer() result是JavaScript ArrayBuffer包含的二进制数据。
readAsBinaryString() result包含在一个字符串的文件的原始的二进制数据。
readAsDataURL() result是一个字符串data:表示文件的传输数据的URL。
readAsText() result是一个字符串文本。

此示例展示了一个函数,read()该函数从file input读取文件。它的工作方式是创建一个FileReader对象并为加载事件创建一个侦听器,以便在读取文件时result获取并将其传递给提供给的回调函数read()

内容作为原始文本数据处理。

var fileInput = document.querySelector('input[type="file"]');

function read(callback) {
  var file = fileInput.files.item(0);
  var reader = new FileReader();

  reader.onload = function() {
    callback(reader.result);
  }

  reader.readAsText(file);
}
posted @   極9527  阅读(1089)  评论(0编辑  收藏  举报
编辑推荐:
· 为什么 .NET8线程池 容易引发线程饥饿
· golang自带的死锁检测并非银弹
· 如何做好软件架构师
· 记录一次线上服务OOM排查
· Linux实时系统Xenomai宕机问题的深度定位过程
阅读排行:
· 2025年广告第一单,试试这款永久免费的开源BI工具
· o3 发布了,摔碎了码农的饭碗
· SQL优化的这15招,真香!
· [.NET] API网关选择:YARP还是Ocelot?
· 将 EasySQLite 从 .NET 8 升级到 .NET 9
  1. 1 Overthinker INZO
  2. 2 Overflow (feat. Helen Tess) smle / Helen Tess
  3. 3 Machine (feat. Heather Jeanette) Sinner's Heist / Heather Jeanette
  4. 4 Here at Last William Black / Rico & Miella
  5. 5 Daydreamer William Black / AMIDY
  6. 6 Holiday (Off the Edge) On Planets / Hanz
  7. 7 Chance (feat. Akacia) will crockford / AKACIA
  8. 8 Silence Loosid
  9. 9 Tattoo (feat. Pearl Andersson) Calmani & Grey / Pearl Andersson
  10. 10 We Won't Leave You Steve Void / Syence
  11. 11 Call Me (feat. Lilianna Wilde) Le Malls / Lilianna Wilde
  12. 12 Undone (feat. Sarah de Warren) Spaces / Sarah De Warren
  13. 13 Move That Body Mickey Valen / King Deco
  14. 14 Let Me Go (feat. Alina Renae) Nurko / Alina Renae
  15. 15 We Will Rock You Why Mona / Unlike Pluto / Joanna Jones
  16. 16 Worst in Me Unlike Pluto
  17. 17 seams (feat. RØRY) Seams / RØRY
  18. 18 Ultraviolet Colordrive
  19. 19 Lying & Loving (feat. MOTHICA) Electric Mantis / Mothica
  20. 20 Second Guess (yitaku Remix) Khamsin / Anuka / yitaku
  21. 21 Second Guess (SKUM Remix) Khamsin / SKUM / Anuka
  22. 22 Let U Go Mike Hawkins
  23. 23 Daydreamer (Egzod Remix) William Black / Egzod / AMIDY
  24. 24 How You Like Me (feat. BEGINNERS) Gazzo / BEGINNERS
  25. 25 Sink or Swim (feat. Georgi Kay) Luude / Example / Georgi Kay
  26. 26 Looking For You (Feat. Pauline Herr) We Are Fury / Crystal Skies / Pauline Herr
  27. 27 Pillow (feat. Half an Orange) Blonde Maze / Half an Orange
  28. 28 Moonlight Shuba
  29. 29 Undone Sarah De Warren
  30. 30 Care No More Morgin Madison
  31. 31 Rise Now (feat. Ingrid Lukas) Faux Tales / Ingrid Lukas
  32. 32 Cycles (feat. CASHFORGOLD) Tim Schaufert / Subsets / CASHFORGOLD
  33. 33 Heaven Midoca
  34. 34 Sub Zero (feat. Max Landry) (Boehm Remix) Boehm / Aiden Jude / Max Landry
  35. 35 Sub Zero (feat. Max Landry) (Kue Remix) Aiden Jude / Max Landry / Kue
  36. 36 Sub Zero (feat. Max Landry) (Holly Remix) Aiden Jude / Max Landry
  37. 37 The Way (feat. Calin, URBAN) Enthic / Calin / Urban
  38. 38 Surrender LIHO
  39. 39 I'm Sorry I'm Gone Midoca / badXchannels
  40. 40 Lie Over You MÜNE / Zack Gray
  41. 41 Tell Me Something New PRXZM
  42. 42 End of May PRXZM
  43. 43 Queen of Hearts PRXZM
  44. 44 Through The Night PRXZM
  45. 45 Come Alive PRXZM
  46. 46 In The Morning PRXZM
  47. 47 Home To Me PRXZM
  48. 48 Bangin Paymon
  49. 49 Lemonade Parker
  50. 50 All of the Lights Alexander Lewis / Brasstracks
  51. 51 Trouble Ameria / YungSnapLorde
  52. 52 Let U Go UPRIZE
  53. 53 Sleepwalker (Tisoki Remix) Tisoki / AWAY / London Thor
  54. 54 Inner Symphony Stereohats / Medii
  55. 55 Risk It All Out There / Blake Rose
  56. 56 Drifter IZII / Christian French
  57. 57 My Way (feat. MOONZz) Khamsin / MOONZz
  58. 58 rearview alxxa
  59. 59 Lifted Keaton Vegades
  60. 60 Mad Love Jasper Dietze / Helen
  61. 61 What You Want Morgin Madison
  62. 62 Alone Synchronice
  63. 63 Cloudbreak Synchronice
  64. 64 Light Synchronice
  65. 65 Almost There Synchronice
  66. 66 Missing (feat. LIZ) Synchronice / LIZ
  67. 67 Chasing Light MEMBA / Mothica
  68. 68 Queen of Hearts PRXZM
  69. 69 Man That I Was (feat. Hvnnibvl) Poorchoice / HVNNIBVL
  70. 70 Made of Time Kill Paris / TRØVES / Emily Vaughn
  71. 71 Indian Giver Keaton Vegades
  72. 72 We Can Be [esq] ape
  73. 73 Smooth Talkin' (feat. Skye Strickler) Fancy Folks / Outdream / Skye Strickler
  74. 74 Only Human J-Marin / Ukamea
  75. 75 Don't Go Becko / Goja
  76. 76 Heartbeat Luv Drunk
  77. 77 Vulnerable Magnifico / Philip Nolan
  78. 78 Made For You (feat. Brooke Williams) Neo Noir / Brooke Williams
  79. 79 Out Of The Dark (feat. Nina Sky) Bishu / Nina Sky
  80. 80 Nobody Told Me (feat. David Davis) StayLoose / David Davis
  81. 81 Bird Flu Juelz / Landyn
  82. 82 Lost Sinner's Heist / Unknown Brain / Karra
  83. 83 Honest To Gød (Eliminate Remix) Eliminate / AWAY / Charity
  84. 84 Distortion Unknown Brain / Rfen
  85. 85 Going Under (Villms & Medii Remix) TELYKast / Lauren Voge / Villms / Medii
  86. 86 Sub Zero (feat. Max Landry) Aiden Jude / Max Landry
  87. 87 Chemicals (feat. Keaton Vegades) James Mercy / Keaton Vegades
  88. 88 Alone Synchronice
  89. 89 The Life (feat. Hudson East) Fabian Mazur / Hudson East
  90. 90 Turn Around SAINTS
  91. 91 Hate You (feat. Aviella) Leowi / Aviella
  92. 92 Chuck Taylors (feat. Bijou.) Half an Orange / BIJOU
  93. 93 Be Good Saphire
  94. 94 Coming Home Realm
  95. 95 Second Guess (feat. Anuka) Khamsin / Anuka
  96. 96 Flying High (feat. Yashar Gasanov) 5 & A Dime / Yashar Gasanov
  97. 97 Metronome (feat. Manasseh) Hurley Mower / Manasseh
  98. 98 Moving On (feat. RAABERS) Outwild / RAABERS
  99. 99 Drive (feat. Rookie) Olmos / Rookie
  100. 100 Smoke (feat. Indigou) Snareskin / Indigou
  101. 101 The Force Theme Far Out
  102. 102 Fall Down on Me TELYKast / Lemay
  103. 103 Waitin Cavest.
  104. 104 Back for the Night (feat. Raelien) AJ Afterparty / Noah Kickback / Raelien
  105. 105 Vision (feat. Josh Pan) SLUMBERJACK / QUIX / josh pan
  106. 106 Nothing Lasts (feat. Pauline Herr) Taska Black / Pauline Herr
  107. 107 Never Alone Ameria / YungSnapLorde
  108. 108 Thoughts ŁOUD
  109. 109 Sound of Heartbreak AJ Afterparty
  110. 110 Worth It (feat. Kaitlin Grace) J-Marin / Outr3ach / Kaitlin Grace
  111. 111 It's Time (feat. Broderick Jones) triste noir / Broderick Jones
  112. 112 Can't Lose Cavest.
  113. 113 Going Under TELYKast / Lauren Vogel
  114. 114 Holdin' On (feat. Raj Chrome) Gazzo / Raj Chrome
  115. 115 Dark Thoughts Jessi Teich
  116. 116 Dark Thoughts (Frank Pole Remix) Jessi Teich / Frank Pole
  117. 117 We Won't Leave You (Navarra Remix) Steve Void / Navarra / Syence
  118. 118 We Won't Leave You (Paperwings Remix) Steve Void / Paperwings / Syence
  119. 119 We Won't Leave You (Wild Cards Remix) Steve Void / Wild Cards / Syence
  120. 120 Ready (UNKWN Remix) UNKWN / WiDE AWAKE
  121. 121 Mist ReauBeau / Creepa / Jamal
  122. 122 Positive (feat. WRENN) Prince Fox / Wrenn
  123. 123 No Scrubs Unlike Pluto / Joanna Jones
  124. 124 Places (feat. Edgar Sandoval Jr) Meric / Edgar Sandoval Jr
  125. 125 Honest To Gød (feat. Charity) AWAY / Charity
  126. 126 Mom Song Omri
  127. 127 Hope (feat. Philip Nolan) Revoke / Philip Nolan
  128. 128 Sleepwalker (feat. London Thor) (DROELOE Remix) AWAY / London Thor / DROELOE
  129. 129 Sleepwalker (feat. London Thor) (TWO OWLS Remix) AWAY / London Thor / TWO OWLS
  130. 130 Sleepwalker (feat. London Thor) (GALLUS Remix) AWAY / London Thor / GALLUS
  131. 131 Holding On Tre Sera / Matthew Grant
  132. 132 Reason (feat. Madison Malone) Leonell Cassio / Madison Malone
  133. 133 Keeping Me Close (feat. Adeline Um) Rohaan / Hanz / Adeline Um
  134. 134 Want You AJ Afterparty
  135. 135 Don't Talk About It (feat. Neon Hitch) Fabian Mazur / Neon Hitch
  136. 136 Dark Thoughts Jessi Teich
  137. 137 Broken (feat. Heather Sommer) Sinner's Heist / Heather Jeanette
  138. 138 Thrill Over Fear (feat. Luna Blake) A Flow Mobz / Luna Blake
  139. 139 Paradise (feat. Lost Boy) Luude / TWERL / Lost Boy
  140. 140 Arena Fabian Mazur / Snavs
  141. 141 Down Easy Brooke Williams
  142. 142 Red Sands Avae
  143. 143 Kiss The Sky Avae / Honoré
  144. 144 Red Sands Avae
  145. 145 Happy Together Why Mona / Unlike Pluto / Joanna Jones
  146. 146 Yesterday Ameria / YungSnapLorde
  147. 147 Through with You WOLFE
  148. 148 When Ur Gone (feat. Nikki Flores) Neo Noir / Nikki Flores
  149. 149 Wannabe Why Mona / Unlike Pluto / Joanna Jones
  150. 150 Firestarter Fabian Mazur / UNKWN
  151. 151 4 Me (feat. Kyle the Hooligan) Waju / Kyle The Hooligan
  152. 152 Time of the Season [esq] ape
  153. 153 Follow You (feat. GRAYE) Dreweybear / GRAYE
  154. 154 Contact Far Out
  155. 155 New Beginning Far Out
  156. 156 Wasted (feat. Marco Foster) JayKode / Marco Foster
  157. 157 Only with You Sam Pace
  158. 158 Chimera Crystal Skies
  159. 159 Dichotomy (feat. AERYN) Crystal Skies / AERYN
  160. 160 Long Ago (feat. Q'AILA) Crystal Skies / Q'AILA
  161. 161 Something New (feat. AERYN) Crystal Skies / AERYN
  162. 162 6AM (feat. Kait Weston) IZII / Kait Weston
  163. 163 Young Together (feat. Helen Tess) Kazlo / Helen Tess
  164. 164 Wildfire James Mercy / Mia Vaile
  165. 165 Let It Bleed (feat. Cristina Gatti) Unlike Pluto / Cristina Gatti
  166. 166 Halo (feat. yasaquarius) Lexxmatiq / Yasaquarius
  167. 167 Willy Wonk Unlike Pluto
  168. 168 Let It Bleed Unlike Pluto / Cristina Gatti
  169. 169 Worst In Me Unlike Pluto
  170. 170 Smile Prismo
  171. 171 Violet (feat. Brooke Williams) Neo Noir / Brooks Williams
  172. 172 Press Play and Escape Teflon Sega
  173. 173 Hailstorm Whales / Divinity
  174. 174 In Tongues MineSweepa
  175. 175 Wildcard (feat. Feli Ferraro) (it's different & Kivnon Remix) Mickey Valen / it's different / Kivnon / Feli Ferraro
  176. 176 Wildcard (feat. Feli Ferraro) [Whales Remix] Whales / Mickey Valen / Feli Ferraro
  177. 177 Wildcard (feat. Feli Ferraro) (Jasper Dietze Remix) Mickey Valen
  178. 178 Wildcard (feat. Feli Ferraro) (Avae Remix) Mickey Valen / Feli Ferraro
  179. 179 Wildcard (feat. Feli Ferraro) (Paperwings Remix) Mickey Valen / Paperwings / Feli Ferraro
  180. 180 Wildcard (feat. Feli Ferraro) (WE5 Remix) Mickey Valen / WE5 / Feli Ferraro
  181. 181 Wildcard (feat. Feli Ferraro) (Nolan van Lith Remix) Mickey Valen / Nolan van Lith / Feli Ferraro
  182. 182 Betrayed Jaeger
  183. 183 Phantom Forest (feat. Meilur) Lumberjvck / Meilur
  184. 184 Surfacing Ship Wrek / Akame
  185. 185 Too Much NITTI
  186. 186 You'll Never Know Just A Gent / Moza
  187. 187 No Sounds (feat. MJ Ultra) Boxinbox / MJ Ultra
  188. 188 When I Was Young (feat. Brooke Williams) (Acoustic) Neo Noir / Brooke Williams
  189. 189 When I Was Young (feat. Brooke Williams) (BVRNOUT Remix) Neo Noir / Brooke Williams / Bvrnout
  190. 190 Surrender (feat. Mia Vaile) Lexxmatiq / Mia Vaile
  191. 191 Ceasefire (Feat. Becca Krueger, Eliason) BEAUZ / Luke Anders / Ducka Shan / Becca Krueger / Eliason
  192. 192 Poppy Seeds (feat. Neon Hitch) Party Thieves / JayKode / Neon Hitch
  193. 193 Follow Your Heart (WiDE AWAKE Remix) Bvrnout / WiDE AWAKE / Cadence Ludden
  194. 194 Follow Your Heart (Synymata Remix) Bvrnout / Synymata / Cadence Ludden
  195. 195 Sun Goes Down (ReauBeau Remix) Fabian Mazur / ReauBeau
  196. 196 Sun Goes Down (Tenvey Remix) Fabian Mazur / Tenvey
  197. 197 Sun Goes Down (BEATSMASH Remix) Fabian Mazur / Beatsmash
  198. 198 Save You (feat. Hannah K) Jaydon Lewis / it's different / Hannah K.
  199. 199 You Know Bvrnout
  200. 200 Famous NITTI / Jupe
  201. 201 Sleepwalker (feat. London Thor) AWAY / London Thor
  202. 202 Overdose (feat. Oktavian) Lady Bee / Oktavian
  203. 203 Lonesome Rider The Delta Mode
  204. 204 Colors (feat. London Ellis) Neo Noir / London Ellis
  205. 205 Like We Do (feat. Anuka) Kozah / Anuka
  206. 206 Heaven Nine Lives
  207. 207 All I Need (feat. Cuchara) UNKWN / WiDE AWAKE / Cuchara
  208. 208 Mahal (HEXXOS Remix) Gent & Jawns / UDJAT
  209. 209 Burn the Stars Massive Vibes
  210. 210 Speed of Sound (feat. Matthew Steeper) Aerreo / Stereohats / Matthew Steeper
  211. 211 Hollow Husk Snareskin / Luke Cusato
  212. 212 Missing You (feat. Sarah de Warren) EFF3CTS / Sarah De Warren
  213. 213 Caught Fire (feat. Ashley Lawless) Mercy X / Ashley Lawless
  214. 214 Decor Fedmate
  215. 215 Whatcha Think (feat. Jake Herring) Evix / Jake Herring
  216. 216 Built For It (feat. Emma Sameth) ReauBeau / Maesic / Emma Sameth
  217. 217 Make You Mine (feat. Ameria) Aire Atlantica / Ameria
  218. 218 Lishu TWERL / DEVAULT
  219. 219 After Dawn Jaeger / Meric Again
  220. 220 When I Was Young (feat. Brooke Williams) Neo Noir / Brooke Williams
  221. 221 Follow Your Heart (feat. Cadence Ludden) Bvrnout / Cadence Ludden / KROMATIKS
  222. 222 Wildcard (feat. Feli Ferraro) Mickey Valen / Feli Ferraro
  223. 223 Feel Me (feat. Elora Zamar) Hopsteady / Elora Zamar
  224. 224 Pressure (feat. Josh Rubin) Baron Fields / Josh Rubin
  225. 225 Come Down Elk Road
  226. 226 Jungle Hurley Mower
  227. 227 Blazed Le Malls / Beckii Power
  228. 228 Let Me Go (feat. KARRA) Paris Blohm / Karra
  229. 229 FADed Harrison First
  230. 230 Emotional (feat. Ala) Türküm / ALA
  231. 231 Sun Goes Down Fabian Mazur
  232. 232 Bill Muray (feat. Andy Marsh) Ave / EFX / blklght / Andy Marsh
  233. 233 About You Medii
  234. 234 Meet Me (BKAYE X Ben Maxwell Remix) Mickey Valen / BKAYE / Ben Maxwell / Noe
  235. 235 Meet Me (OTR Remix) Mickey Valen / OTR / Noe
  236. 236 Meet Me (Olmos Remix) Mickey Valen / Noe / Olmos Remix
  237. 237 Meet Me (Robin Pace Remix) Noe / Mickey Valen / Robin Pace
  238. 238 Meet Me (Maliboux & UNKWN Remix) Mickey Valen / Maliboux / UNKWN / Noe
  239. 239 Meet Me (TENVEY Remix) Mickey Valen / Tenvey / Noe
  240. 240 4U Jordan Comolli
  241. 241 Run (feat. Tima Dee & Giant Spirit) Blvk Sheep / Tima Dee & Giant Spirit
  242. 242 Black and White (feat. MJ Ultra) Boxinbox / MJ Ultra
  243. 243 Watch Me Fall (feat. Ashliann) The Lifted / Ashliann
  244. 244 Underneath (feat. AERYN) Synchronice / AERYN
  245. 245 $tacks Curfew
  246. 246 Insanity Blvk Sheep
  247. 247 March Alexander Lewis
  248. 248 Victory OZZIE
  249. 249 Farewell Party Thieves
  250. 250 Focused Calli Boom / Noax
  251. 251 DTLA 92' (feat. Mayowa) PRXZM / Gladiator / Mayowa
  252. 252 The Fall (feat. Mia Vaile) Not Your Dope / Mia Vaile
  253. 253 Far Sight (feat. Holly Jade) Jinco / We Are Fury / Holly Jade
  254. 254 World (feat. RULS) Kicks N Licks / Ruls
  255. 255 Will You I Will (feat. HVNNIBVL) it's different / HVNNIBVL
  256. 256 Into Dust (feat. Elle Vee) Paris Blohm / Elle Vee
  257. 257 Free Blvk Sheep / Mona Moua
  258. 258 Sonata Magnifico / Taptone
  259. 259 Never Lost Snareskin / Holly
  260. 260 Mahal (Original Trap Mix) Gent & Jawns
  261. 261 In Time DROELOE / Belle Doron
  262. 262 R&G Le Malls
  263. 263 Stay (feat. Sarah de Warren) Living Legacy / Sarah De Warren
  264. 264 Fun (feat. Bazzi) Fancy Cars / Bazzi
  265. 265 Paint The Sky (feat. LA James) Ave / EFX / blklght / LA James
  266. 266 Know Better (feat. Mister Blonde) JayKode / Mister Blonde
  267. 267 Illusion Synchronice
  268. 268 Warped Tides CRVE U
  269. 269 Human Synchronice
  270. 270 Turtle Ship Ghasper
  271. 271 Chapel Felmax
  272. 272 Give Me Love (feat. Broderick Jones) Kyle Braun / Broderick Jones
  273. 273 Make Dem (feat. Kédo Rebelle) JRND / VMK / Kédo Rebelle
  274. 274 You & I (feat. Shara) Ellusive / TELYKast / Shara
  275. 275 Daydream (feat. Paniz) Avae / Paniz
  276. 276 Tell Me it's different / Helen
  277. 277 Alone Jordan Akka / Dimelow
  278. 278 Coming Home Módl / Holly
  279. 279 Kalahari Take/Five / Curfew
  280. 280 Under The Covers (feat. Emma Sameth) WOLFE / Emma Sameth
  281. 281 Clocktower (feat. Mia Vaile) Jinco / Mia Vaile
  282. 282 Dough Felmax
  283. 283 Meet Me Mickey Valen / Noe
  284. 284 5 AM Not Your Dope
  285. 285 Contrast Jordan Comolli
  286. 286 Don't Leave the Light On (feat. Tom Cantillon) Revoke / Tom Cantillon
  287. 287 Tell Me Take/Five
  288. 288 Damage James Meyers
  289. 289 Ready WiDE AWAKE
  290. 290 Flare (feat. Kat Kennedy) Channels / Kat Kennedy
  291. 291 Nothing New DEVAULT
Ready (UNKWN Remix) - UNKWN / WiDE AWAKE
00:00 / 00:00
An audio error has occurred, player will skip forward in 2 seconds.
点击右上角即可分享
微信分享提示