How can I completely delete a file that was uploaded to Gitlab in an issue comment?

Viewed 2649

Someone uploaded (attached) a file in a Gitlab issue comment. They did not mean to share that file publicly. I can delete the comment, but the file is still available via the original direct url. The file is at:

https://gitlab.com/<username>/<repo>/uploads/<hash>/<filename>

Is there any way to completely remove files from this uploads directory?

1 Answers

Short version: There's server-side Uploads administration | GitLab, but little to nothing else.

TLDR:

For the owner of a repository, there seems to be no way to get hold of these uploads directly, there even doesn't seem to be a way to list all uploads pertaning to a specific repository (or user/owner), let alone modify them.

use-cases where this would be desirable:

  • deletion of data that should not be exposed but has been erroneously.
  • down-scaling of oversized files (images, pdfs, etc)
  • replacing files with updated versions
  • deleting space-hogs that are no longer needed.
  • deleting files that got uploaded accidentally by trigger-happy mice or when the result of a previous upload didn't show in time for the impatient user.

Making these files changeable would cause several issues rooted in their current/previous immutable status: Users aware of this status will frequently re-use the url to an already uploaded file for perusal in other issues, or the associated wiki (even across projects) to avoid duplication. Afaik, there is no such thing as a link-count for upload items, so deleting an item might result in orphaned references, and changing an uploaded file might render other references out-of-context.

It would solve the serious issue of leaked information, though. The only way I have found so far to remove a file would be to send a prayer to the administrator of the gitlab server, and ask him/her to take care of the uploads directory on the server, as described in Uploads administration | GitLab

Related