アップロード途中で止まると相当なストレスですよね。そこで使ってみたいライブラリです。 HTML5を使うとファイルをドラッグ&ドロップでアップロードできるようになってとても便利になっています。しかしごく小さなファイルのアップロードであればまだしも、巨大なファイルをアップロードするとなるとまだ大きな問題が残っています。それがネットワークエラーです。 Webではファイルを一括でアップロードしますので、途中でエラーが起きるとまた最初からやり直しになってしまいます。これはクライアント/サーバ双方に負荷がかかる仕組みです。これを改善できるのがResumable.js、リジューム対応のファイルアップローダーです。 サンプルのnodeアプリケーションで実験します。 900MBくらいのファイルをアップロードします。 右側にある一時停止ボタンを押すとアップロードが停止します。 いつでも再開が可能です。 この仕
<input type='file'/> で画像を選択させる input.onchange が発火するのでコールバックをとる File APIがあれば input.files[0] にFileオブジェクトが入ってるの抜き取る FileReader の FileReader#readAsDataURL に Fileオブジェクトを渡す FileRead#onload が発火するのでevent.target.result に Data uri が入ってる imgのsrcにData uri ぶち込む <img class='image-preview'/> <input type='file' class='file-selector'>upload</input> $preview = $('img.image-preview') $file = $('input.file-selector')
Read files in JavaScript Stay organized with collections Save and categorize content based on your preferences. How to select files, read file metadata and content, and monitor read progress. Selecting and interacting with files on the user's local device is one of the most commonly used features of the web. It allows users to select files and upload them to a server, for example, uploading photos
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く