I found the error due to the content-type is nil from Mime:type.lookup_by_extension(ext), and I fixed it. https://github.com/AssetSync/asset_sync/pull/322