2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

SharePointリスト添付ファイルリンク取得時の注意

Posted at

緒言

ドキュメントライブラリの「アイテムへのリンク」だと問題なかったんですが、SharePointリスト添付ファイルの「AbsoluteUri」はURLエンコードしてくれないので要注意。EncodeUrl()関数を使うと解決。

2025年5月24日時点のバージョン3.25051.13の情報です。

詳細

ドキュメントライブラリの場合、下図のように「アイテムへのリンク」を指定するとファイル名がエンコードされている。
image.png

リストの添付ファイルの「AbsoluteUri」はエンコードされません。
環境によってはこのままリンク開こうとするとエラーになることがある。
image.png

EncodeUrl(First(ThisItem.添付ファイル).AbsoluteUri)で解決。
image.png

結言

変なファイル名つけてほしくないですが、あらゆることを想定しないとですね。。。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?