Allowed upload file extensions

It could be handy if the forum allowed to upload .conf and other kind of “text” files…

Or even different kind of tar archives, fe. i wanted to upload a .tzst file in one of my topics…
(This is a zstd compressed tar archive)

Text files would be cool, but i can understand why compressed archives are not permitted as those are pretty common ways of distributing malware and otherwise unwanted stuff. :slight_smile:

3 Likes

The current list of authorized file extensions allowed for upload are:

jpg, jpeg, png, gif, heic, heif, webp

EDIT: just added webp as well.

For text, it’s better to copy and paste short text bits here using formatted text. For longer outputs, it’s best to use a pastebin service or create a gist and link it here.

Compressed archives will never be allowed for the reason @Strit mentioned above.

1 Like

Is this an “across-the-board” Discourse thing, or can it be adjusted on this forum? The reason I ask is because it would be helpful (and more size efficient; hence less bandwidth) to allow WEBP (.webp) attachments.


To be clear, WEBP is more size-efficient than JPEG, and it even supports lossless compression, which I’ve found to be superior to PNG’s efficiency in many instances.


EDIT:

I took a cropped screenshot of this page, and exported it as four different formats.

From largest to smallest:

  • PNG
    – 134 KB
    – No artifacts around text, even red text, crisp and clean (lossless, so of course)

  • JPEG (quality 80)
    – 103 KB
    – Artifacts and noticeable quality loss, especially around red text

  • WEBP (lossless)
    – 64 KB
    – No artifacts around text, even red text, crisp and clean (lossless, so of course)

  • WEBP (quality 80)
    – 52 KB
    – Artifacts and noticeable quality loss, especially around red text

So lossy WEBP (at “quality 80”) is still half the size of a comparable JPEG. But I think the clear winner when attaching screenshots that contain blank space and text is WEBP lossless. It’s less than half the size of the PNG, and looks exactly like the original. :sunglasses:

3 Likes

@Strit @Yochanan yea i agree about the malware potential, that slipped my mind :woman_facepalming:
But that ain’t such a big deal either cause they will be handled swiftly by the community and moderators :rofl:

Just as an example, the archive i mentioned above has these directories and files (with extended attributes on them): (2366 bytes / 2.4KiB)

systemd/network/
systemd/network/.snippets/
systemd/network/.snippets/Match-Bond.conf
systemd/network/.snippets/Match-NoBond.conf
systemd/network/.snippets/Link-Disabled.conf
systemd/network/.snippets/Link-NotRequiredForOnline.conf
systemd/network/.snippets/Network-IgnoreCarrierLoss.conf
systemd/network/.snippets/Match-WifiAdapters.conf
systemd/network/.snippets/DHCP-RouteMetric-wired.conf
systemd/network/.snippets/DHCP-RouteMetric-wifi.conf
systemd/network/11-wifi.link
systemd/network/12-bond0.netdev
systemd/network/12-bond0.netdev.d/
systemd/network/12-bond0.netdev.d/Match-Bond.conf
systemd/network/29-bond0.network
systemd/network/29-bond0.network.d/
systemd/network/29-bond0.network.d/Match-Bond.conf
systemd/network/81-wifi-ap.network
systemd/network/82-wifi-station.network
systemd/network/82-wifi-station.network.d/
systemd/network/82-wifi-station.network.d/Match-NoBond.conf
systemd/network/82-wifi-station.network.d/Network-IgnoreCarrierLoss.conf
systemd/network/82-wifi-station.network.d/Link-NotRequiredForOnline.conf
systemd/network/82-wifi-station.network.d/Match-WifiAdapters.conf
systemd/network/82-wifi-station.network.d/DHCP-RouteMetric-wifi.conf
systemd/network/20-bond0-wired.network.d/
systemd/network/20-bond0-wired.network.d/Match-Bond.conf
systemd/network/20-bond0-wired.network.d/Link-NotRequiredForOnline.conf
systemd/network/20-bond0-wired.network
systemd/network/21-bond0-wifi.network.d/
systemd/network/21-bond0-wifi.network.d/Match-Bond.conf
systemd/network/21-bond0-wifi.network.d/Link-NotRequiredForOnline.conf
systemd/network/21-bond0-wifi.network.d/Network-IgnoreCarrierLoss.conf
systemd/network/21-bond0-wifi.network.d/Match-WifiAdapters.conf
systemd/network/21-bond0-wifi.network
systemd/network/10-wired.link
systemd/network/80-wired.network
systemd/network/80-wired.network.d/
systemd/network/80-wired.network.d/DHCP-RouteMetric-wired.conf
systemd/networkd.conf.d/
systemd/networkd.conf.d/admin.conf

And that’s too much to post inside code fences :wink:
But sometimes the other online services ain’t a good choice either because they need extra accounts and contain too much advertisement or even remove the uploads after certain time…

@winnie i never knew that :+1:

In such a case, you can link to the file on another website, like Nextcloud, Google Drive, Dropbox etc. The use-case you posted is not a common one. Not many shares their entire configuration on a forum, and they shouldn’t.

So if you want to share archives of files, host them on another site, then link it in your post.

1 Like

I know, that’s why i made this suggestion to keep our stuff on our site :wink:
(People searching for stuff will then only find it on this site and thus promote Manjaro even more)

Yes. Just added webp. Thanks for the suggestion. :+1:

3 Likes

Testing, testing! Let’s see if this works!


WEBP 80% quality, lossy (29 KiB)


WEBP, lossless (43 KiB)


JPEG 80% quality, lossy (62 KiB)


PNG, lossless (78 KiB)


Alrighty! Thank you, @Yochanan!

Mission success!

:clap: :+1:

Plus, it supports animation like GIF. This is an advantage over JPG which don’t support animation.
But I am not sure, if WEBP animated file size is smaller than GIF?


Edit:

I checked the gif to webp conversion:
Many webp files are smaller in size than GIF when using best WEBP compression “mixed”.
But few GIF files are bit smaller than webp without the compression.


Edit:

There is the package libwebp.
How to convert gif to webp:

  • Quality lossless (Quality: 100%)
$ gif2webp <FILE.gif> -q 100 -o <FILE.webp>
  • Compression: mixed (default quality: 75%)
$ gif2webp <FILE.gif> -mixed -o <FILE.webp>
  • Compression: lossy (default quality: 75%)
$ gif2webp <FILE.gif> -lossy -o <FILE.webp>
2 Likes