Project

General

Profile

Actions

Enhancement(機能追加・改善) #4275

closed

iOS 11.3 での値が設定されていない <input type="file"> を ajax で送信できない問題を回避する

Added by kaoru n over 6 years ago. Updated over 6 years ago.

Status:
Fixed(完了)
Priority:
Normal(通常)
Assignee:
Target version:
Start date:
2018-05-11
Due date:
% Done:

100%

Estimated time:

Description

Overview (概要)

https://stackoverflow.com/questions/49578686/my-ajax-request-stopped-working-properly-on-ios-11-3/49631048

Spec (仕様)

ajax 通信にて FormData を利用している箇所に下記コードを埋め込んで回避する。

    for (var index = 1; index <= 3; index++)
    {
      var photo = $('#diary_photo_' + index).val();
      if (photo == null || photo == '') {
        if (typeof fd.delete != "undefined"){
          fd.delete('diary_photo_' + index);
        }
      }
    }

下記の部分については、 iOS 11.01 において FormData.delete がサポートされていないことを回避するために分岐する。
参考: https://lab.syncer.jp/Web/API_Interface/Reference/IDL/FormData/delete/

typeof fd.delete != "undefined" 

Actions #1

Updated by kaoru n over 6 years ago

  • Target version changed from dev-1.5.x to v1.5.2
Actions #2

Updated by kaoru n over 6 years ago

  • Status changed from New(新規) to Pending Review(レビュー待ち)
  • % Done changed from 0 to 50

https://github.com/tejimaya/opDiaryPlugin/pull/5
にてプルリクエストしました

Actions #3

Updated by isao sano over 6 years ago

  • Status changed from Pending Review(レビュー待ち) to Pending Merge(マージ待ち)
  • % Done changed from 50 to 80

確認いたしました。
問題ありません。

Actions #4

Updated by kaoru n over 6 years ago

  • Status changed from Pending Merge(マージ待ち) to Fixed(完了)
  • % Done changed from 80 to 100

マージしました

Actions

Also available in: Atom PDF