laravel/ideas

Filesystem S3 Append is removing tags

pawan1793 opened this issue · 0 comments

When appending data via s3 filesystem tag which is assigned to file is getting removed ...
This might because of append is calling put method with empty options

/**
    * Append to a file.
    *
    * @param  string  $path
    * @param  string  $data
    * @param  string  $separator
    * @return bool
    */
   public function append($path, $data, $separator = PHP_EOL)
   {  
       if ($this->exists($path)) {
           return $this->put($path, $this->get($path).$separator.$data);
       }

       return $this->put($path, $data);
   }

Is there any other way to preserve tags which are already present in object

//tag is added properly
$storage->put($path, $data',[ 'Tagging' => 'type=xyz']);

//same tag is getting removed when calling append
$storage->append($path,$data);

Laravel version 8.0