0
0

More than 5 years have passed since last update.

rs-csv-importer-media-plusで画像ファイル名が重複する

Posted at

問題点

wp_post_helperを使った、rs-csv-importer-media-plusはちょうべんりなんだけれども、カスタムフィールドに画像アップロードするときに、ファイル名が同じものだと上書きされてしまって、思い通りの動作にならないんです。

"post_type", "post_title", "custom_image"
"post", "記事1", "http://example.com/01/01.jpg"
"post", "記事2", "http://example.com/02/01.jpg"

みたいなCSVをインポートすると、記事1も記事2も同じ画像を参照するんですよ。

回避方法

とりあえずurlのmd5にすれば重複することはなかろうと。
https://github.com/zoker/wp_post_helper/commit/aead552ac15522380eaad1457a0b93cc4b449a57

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