-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Currently, the /projects/:projectPublicId/attachments/:driveDiscoveryId/:type/:name endpoint does not support HEAD requests. This results in a 502 Bad Gateway when attempting to fetch just the headers (e.g. using curl -I), even though GET works fine.
HEAD requests would be useful for retrieving the MIME type of files. Since the CoMapeo API serves attachments without file extensions, it seems otherwise impossible to determine the MIME type without downloading the full file. For clients like ours that regularly pull data from comapeo-cloud, this leads to unnecessary bandwidth usage through needing to re-download files we already have, or requires a cumbersome workaround of scanning an attachments/ directory and comparing file stems to avoid duplicates.
To be clear: we have already implemented the latter workaround on our end, and are not blocked by this issue. But still wanted to file this as it would be a nice feature to support, and likely useful for others.