In this tutorial, I am going to show you how to use Ruby on Rails 4.2 and Dropzone to upload multiple files using drag and drop with AJAX. Dropzone is an awesome library that, in this author’s opinion, stands head and shoulders above the rest of the libraries that offer similar functionality. Note that I am going to use plain Ruby on Rails without any other library or gems such as Paperclip or Car
I'm trying to test controller that expects a file upload using the phoenix framework. I followed the guide at the phoenix guides (http://www.phoenixframework.org/docs/file-uploads) and it works in the browser, but i'm having trouble writing a test for it. Here's what i did: test "POST photo" do { :ok, raw_file } = File.read "1528_27.jpg" conn() |> post("/api/v1/originals", %{ :image => raw_file })
【2021/10/15 追記】 この記事は更新が停止されています。現在では筆者の思想が変化している面もありますので,過去の記事として参考程度にご覧ください。 脆弱性について 参考リンク PHPにおけるファイルアップロードの脆弱性CVE-2011-2202 PHP 5.4.1リリースのポイント 上記に対する補足説明 PHP 5.4.1以降 PHP 5.3.11以降 どちらかを満たしているならば,脆弱性は(今のところ)無い.どちらも満たしていないと, $_FILES 変数の構造を崩す攻撃 ../ をファイル名に含めて送信する攻撃 (ディレクトリトラバーサル) の何れか,もしくは両方の脆弱性を所持していることになるので要注意. 脆弱性対策と注意事項 $_FILES Corruption 対策 改竄されたフォームからの複数ファイル配列送信対策 脆弱性が修正された環境でも 改竄フォーム対策 も兼ねて
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く