Instance Property インスタンスプロパティ

suggestedFilename

A suggested filename for the response data. 応答データに対して提案されるファイル名。

Declaration 宣言

@property(nullable, readonly, copy) NSString *suggestedFilename;

Discussion 議論

Accessing this property attempts to generate a filename using the following information, in order: このプロパティにアクセスすることは、ファイル名を生成することを、順番に以下の情報を使って試みます:

  1. A filename specified using the content disposition header. 内容配置ヘッダを使って指定されたファイル名。

  2. The last path component of the URL. URLの最後のパス構成要素。

  3. The host of the URL. URLのホスト。

If the host of URL can't be converted to a valid filename, the filename “unknown” is used. URLのホストが有効なファイル名に変換されることができないならば、ファイル名 “unknown” が使われます。

In most cases, this property appends the proper file extension based on the MIME type. Accessing this property always returns a valid filename regardless of whether the resource is saved to disk. ほとんどの場合には、このプロパティは、MIMEタイプに基づきふさわしいファイル拡張子を追加します。このプロパティにアクセスすることは、常に有効なファイル名を返します、リソースがディスクに保存されるかどうかに関係なく。

See Also 参照

Getting the Response Properties 応答プロパティを取得する