ثم قمت بنسخ الصور القديمة يدويًا فقط من المسار standalone/uploads/default/original/1X/* إلى نفس المجلد (على استضافتي).
هل توجد أي أمر سينشئ الصور في مجلد التحسين (لا تزال الرموز الشخصية والصور في المنشورات غير موجودة)؟ هل هذا كل ما يلزم لإعادة توليد الصور؟ كيف يمكنني القيام بذلك بشكل صحيح؟ إعادة خبز المنشور (rebake post) لم تساعد، وكذلك الأوامر الأخرى. سأضيف أن حاوية S3 تم إعدادها أيضًا للملفات.
The following should work as long as you didn’t change the hostname.
Enter the rails console:
cd '/var/discourse
./launcher enter app
rails c
Execute the following:
DB.exec("TRUNCATE TABLE optimized_images")
SiteIconManager.ensure_optimized!
User.where("uploaded_avatar_id IS NOT NULL").find_each do |user|
Jobs.enqueue(:create_avatar_thumbnails, upload_id: user.uploaded_avatar_id)
end
DB.exec(<<~SQL)
UPDATE posts
SET baked_version = NULL
WHERE id IN (SELECT post_id FROM post_uploads)
SQL
And then exit the rails console and execute a rake task: