1
0

添付されたファイルを使って公開リンクを作成するフロー

Last updated at Posted at 2024-01-29

はじめに

以下を考慮していないので、実際に使うには注意が必要です。

  • 既に公開リンクが作成されていたら、再作成しないようにする
  • 複数のファイルがあった時の対応

今回は商品の表示URL欄に結果を更新します。

image.png

全体

image.png

変数

変数名 種類 用途
recordId テキスト 商品のIdを格納
ContentDistributionId 作成したContentDistributionのIdを格納
Product2 レコード(商品) 商品を更新するためのレコード変数

getProduct2

image.png

getContentDocumentLink

image.png

getContentDocument

image.png

getContentVersion

image.png

CreateContentDistribution

image.png

getContentDistribution

image.png

assignProduct2

image.png

updateProduct2

image.png

ContentDistributionを調べてみます。

ContentDocumentIdはフローで設定していないけど、自動で値がセットされています。ContentVersionIdから参照されているのかもしれないです。

このフローでContentDistributionを作ってもこの部分にはセットされません。
しかし、この機能で公開リンクを作ると、次に開いてもちゃんとURLは存在します。

DistributionPublicUrlの項目が表示されています。

image.png

1
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
1
0