首页 > 解决方案 > 无法上传文件/图像导轨舒适的墨西哥沙发 cms

问题描述

我将舒适的墨西哥沙发 CMS 与我的 rails 6.0 应用程序集成在一起。一切正常。但是文件上传功能不起作用。

服务器不断运行创建和删除ActiveStorage::BlobActiveStorage::Attachment

ActiveStorage::Blob Create (0.8ms)  INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"  [["key", "56qutde9f90cknxanwuqnivgv2eo"], ["filename", "g500-black-back.jpg"], ["content_type", "image/jpeg"], ["metadata", "{\"identified\":true}"], ["byte_size", 2223], ["checksum", "EyM+/P6Ccq9Pw69YV7fAww=="], ["created_at", "2019-09-30 11:26:38.992295"]]
  ActiveStorage::Attachment Create (2.6ms)  INSERT INTO "active_storage_attachments" ("name", "record_type", "record_id", "blob_id", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"  [["name", "attachment"], ["record_type", "Comfy::Cms::File"], ["record_id", 6], ["blob_id", 356], ["created_at", "2019-09-30 11:26:39.029294"]]
   (0.4ms)  SELECT "comfy_cms_categories"."id" FROM "comfy_cms_categories" WHERE "comfy_cms_categories"."categorized_type" = $1  [["categorized_type", "Comfy::Cms::File"]]
  Comfy::Cms::Categorization Load (0.4ms)  SELECT "comfy_cms_categorizations".* FROM "comfy_cms_categorizations" WHERE "comfy_cms_categorizations"."categorized_id" = $1 AND "comfy_cms_categorizations"."categorized_type" = $2 AND "comfy_cms_categorizations"."category_id" = $3  [["categorized_id", 6], ["categorized_type", "Comfy::Cms::File"], ["category_id", 1]]
  ActiveStorage::Attachment Destroy (0.7ms)  DELETE FROM "active_storage_attachments" WHERE "active_storage_attachments"."id" = $1  [["id", 355]]
  ActiveStorage::Blob Create (0.7ms)  INSERT INTO "active_storage_blobs" ("key", "filename", "content_type", "metadata", "byte_size", "checksum", "created_at") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id"  [["key", "so1r6i8qli6p5etiz1fz1jee4hcy"], ["filename", "g500-black-back.jpg"], ["content_type", "image/jpeg"], ["metadata", "{\"identified\":true}"], ["byte_size", 2223], ["checksum", "EyM+/P6Ccq9Pw69YV7fAww=="], ["created_at", "2019-09-30 11:26:39.113055"]]
  ActiveStorage::Attachment Create (0.9ms)  INSERT INTO "active_storage_attachments" ("name", "record_type", "record_id", "blob_id", "created_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"  [["name", "attachment"], ["record_type", "Comfy::Cms::File"], ["record_id", 6], ["blob_id", 357], ["created_at", "2019-09-30 11:26:39.130977"]]
   (0.4ms)  SELECT "comfy_cms_categories"."id" FROM "comfy_cms_categories" WHERE "comfy_cms_categories"."categorized_type" = $1  [["categorized_type", "Comfy::Cms::File"]]
  Comfy::Cms::Categorization Load (0.4ms)  SELECT "comfy_cms_categorizations".* FROM "comfy_cms_categorizations" WHERE "comfy_cms_categorizations"."categorized_id" = $1 AND "comfy_cms_categorizations"."categorized_type" = $2 AND "comfy_cms_categorizations"."category_id" = $3  [["categorized_id", 6], ["categorized_type", "Comfy::Cms::File"], ["category_id", 1]]
  ActiveStorage::Attachment Destroy (0.7ms)  DELETE FROM "active_storage_attachments" WHERE "active_storage_attachments"."id" = $1  [["id", 356]]

标签: ruby-on-railscomfortable-mexican-sofa

解决方案


推荐阅读