Storage Adapters - Saving image twice

Hi,

I’m trying to create a custom storage adapter for ghost, but it seems that whenever any storage adapter is used images are being uploaded twice. This is the case with my own adapter and GitHub - eexit/ghost-storage-cloudinary: A fully-featured and deeply tested Cloudinary Ghost storage adapter. Images are being uploaded twice on both local and production versions of ghost

What version of Ghost are you using?
Tested using 2.20.1, 2.19.3 and 2.19.1
What configuration?

  "storage": {
    "active": "ghost-storage-cloudinary",
    "MyCustomStorageAdapter": {
      "accountId": "accountId",
      "applicationKey": "applicationKey",
    },
    "ghost-storage-cloudinary": {
        "useDatedFolder": false,
        "auth": {
            "cloud_name": "cloud_name",
            "api_key": "api_key",
            "api_secret": "api_secret"
        },
        "upload": {
            "use_filename": true,
            "unique_filename": false,
            "overwrite": false,
            "folder": "blog-images",
            "tags": ["blog"]
        },
        "fetch": {
            "quality": "auto",
            "secure": false,
            "cdn_subdomain": true
        }
    }
  }
}

What browser?
Version 73.0.3683.103 (Official Build) (64-bit)
What errors or information do you see in the console?
When logging frame.files from core/server/api/v2/images.js on a single image upload it logs this.
[ { fieldname: ‘file’,
originalname: ‘chrome_0jIWGhNDHh.png’,
encoding: ‘7bit’,
mimetype: ‘image/png’,
destination: ‘C:\Users\Mark\AppData\Local\Temp’,
filename: ‘567180786389c54c2e2a5ad8115c4228’,
path:‘C:\Users\Mark\AppData\Local\Temp\567180786389c54c2e2a5ad8115c4228_processed’,
size: 11709,
name: ‘chrome_0jIWGhNDHh.png’,
type: ‘image/png’,
ext: ‘.png’
},
{
fieldname: ‘file’,
originalname: ‘chrome_0jIWGhNDHh.png’,
encoding: ‘7bit’,
mimetype: ‘image/png’,
destination: ‘C:\Users\Mark\AppData\Local\Temp’,
filename: ‘567180786389c54c2e2a5ad8115c4228’,
path: ‘C:\Users\Mark\AppData\Local\Temp\567180786389c54c2e2a5ad8115c4228’,
size: 11709,
name: ‘chrome_0jIWGhNDHh_o.png’,
type: ‘image/png’,
ext: ‘.png’
}
]

What steps could someone else take to reproduce the issue you’re having?

It’s normal as Ghost compress the image and preserve the original one.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.