Php Laravel文件上载到GCP存储-.json文件另存为.txt

Php Laravel文件上载到GCP存储-.json文件另存为.txt,php,laravel,google-cloud-platform,Php,Laravel,Google Cloud Platform,我正在将.json文件上传到Laravel项目中的GCP存储桶中。文件上载工作正常,但.json文件另存为.txt文件 例如: filename.json------>filename.txt 然而,当我手动将这些文件上传到bucket时,(通过GCP的UI),这并没有发生。他们按原样上传 这是我的文件上传数据 这是我的密码 public static function uploadFileToGoogleBucket($uploaded_file, $path) { $disk =

我正在将.json文件上传到Laravel项目中的GCP存储桶中。文件上载工作正常,但.json文件另存为.txt文件

例如:

filename.json------>filename.txt

然而,当我手动将这些文件上传到bucket时,(通过GCP的UI),这并没有发生。他们按原样上传

这是我的文件上传数据

这是我的密码

public static function uploadFileToGoogleBucket($uploaded_file, $path)
{
    $disk = Storage::disk('gcs');
    $result = $disk->put($path, $uploaded_file);

    if ($result) {
        $url = $disk->url($result);
    } else {
        $url = null;
    }

    dd($uploaded_file, $url);

    return $url;
}

有没有办法修复这个奇怪的错误

你能分享一下你迄今为止的尝试吗?特别是上传的代码片段,您是否也可以添加
dd
函数?您共享的文件没有显示文件的实际上载。