Comment on Partially incorrect MIME type detection for files newly uploaded to the cloud
@Der Pepe (Hubzilla) ⁂
Sorry, but this won't work, as $os_rel_path is the hash, rather than the filename.
if ($mimetype === 'text/plain' && preg_match('/.css$/i', $os_relpath))
Sorry, but this won't work, as $os_rel_path is the hash, rather than the filename.
$os_basepath = "store/abu/",
$os_relpath = "187613e5-2220-4a71-85c1-f6bff4325a39"
$filenameinstead of$os_relpath, soif ($mimetype === “text/plain” && preg_match(“/.css$/i”, $filename))Is that correct?
text/css.