Autumn is the microservice responsible for storing files and attachments.

Overview

Autumn

Description

Autumn is the microservice responsible for storing files and attachments.

Features:

  • Save files locally or on S3.
  • Support for different tags / buckets with different file requirements.
  • Strips metadata from JPEGs and video files.

Stack

Resources

Revolt

CLI Commands

Command Description
./publish.sh Publish a Docker Image.
./set_version.sh Update the version. Not intended for PR use.
cargo build Build/compile Autumn.
cargo run Run Autumn.
cargo fmt Format Autumn. Not intended for PR use to avoid accidentally formatting unformatted files.

Contributing

The contribution guide is located at developers.revolt.chat/contributing. Please note that a pull request should only take care of one issue so that we can review it quickly.

License

Autumn is licensed under the GNU Affero General Public License v3.0.

To-Do

  • Make EXIF stripping optional, but on by default. (?exif=false)
Comments
  • feat: don't strip orientation EXIF data

    feat: don't strip orientation EXIF data

    Screenshot_20220216-112116_Chrome Beta

    Images rotate upon being posted so that they are sideways, or upside down when the image is from the phone's camera roll. If the image is a screenshot however rotation does not happen.

    improvement 
    opened by NecroHamster987 3
  • feat: support .mov video files

    feat: support .mov video files

    fixes #15

    Please make sure to check the following tasks before opening and submitting a PR

    • [ ] I understand and have followed the contribution guide
    • [x] I have tested my changes locally and they are working as intended
    • [x] These changes do not have any notable side effects on other Revolt projects
    opened by janderedev 0
  • fix: apply orientation metadata to image uploads

    fix: apply orientation metadata to image uploads

    Please make sure to check the following tasks before opening and submitting a PR

    • [x] I understand and have followed the contribution guide
    • [x] I have tested my changes locally and they are working as intended
    • [x] These changes do not have any notable side effects on other Revolt projects

    Fixes #20.

    This PR adds kamadak-exif as a dependency to read EXIF metadata from uploaded image files.

    For testing, here are 8 variants of the same image file created by an iPhone, with manipulated orientation metadata: exif_test.zip.

    opened by janderedev 0
  • feat: upload multiples files in attachments tag

    feat: upload multiples files in attachments tag

    As far as I see to upload files you have to make an individual request for each file, I think it would be better to allow uploading several files at once to avoid that.

    improvement 
    opened by kaname-png 0
  • Block or warn clients when large content is about to be displayed.

    Block or warn clients when large content is about to be displayed.

    Either prevent large media from being played back by recognizing it as a file or selectively block this on clients. Consider adding to revolt.js instead of file server.

    improvement draft priority-0 
    opened by insertish 1
  • Allow configuration of S3 bucket names

    Allow configuration of S3 bucket names

    At the moment, installation assumes that you are using Minio, and requires you to use hardcoded bucket names. This is a problem for anyone wanting to use a cloud storage service such as Amazon S3, since bucket names need to be unique.

    Allowing bucket names to be configured will allow use with cloud hosts such as Amazon S3, and make storage much cheaper for many instances as a result.

    enhancement 
    opened by termermc 1
  • AUTUMN_LOCAL_STORAGE_PATH crash when file is accessed

    AUTUMN_LOCAL_STORAGE_PATH crash when file is accessed

    Hey,

    I tried to setup S3 but I get always S3Error without any helpful message. So I saw in code support for local files using AUTUMN_LOCAL_STORAGE_PATH. It seems like writing files working but not reading.

    thread 'actix-rt:worker:2' panicked at 'there is no reactor running, must be called from the context of a Tokio 1.x runtime', /home/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.5.0/src/runtime/blocking/pool.rs:85:33
    stack backtrace:
       0:          0x1032140 - std::backtrace_rs::backtrace::libunwind::trace::h6292875aed2739db
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
       1:          0x1032140 - std::backtrace_rs::backtrace::trace_unsynchronized::h8e4cae471de489bb
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
       2:          0x1032140 - std::sys_common::backtrace::_print_fmt::h9b5c8993cc054166
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys_common/backtrace.rs:67:5
       3:          0x1032140 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h025a584127ec484d
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys_common/backtrace.rs:46:22
       4:          0x107825c - core::fmt::write::hc12d0803d7cd91f9
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/core/src/fmt/mod.rs:1096:17
       5:          0x1029402 - std::io::Write::write_fmt::hf551e7bfd8a97193
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/io/mod.rs:1568:15
       6:          0x1034465 - std::sys_common::backtrace::_print::h06e7e2e14f5705f1
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys_common/backtrace.rs:49:5
       7:          0x1034465 - std::sys_common::backtrace::print::h0bc916dc7550b9e3
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys_common/backtrace.rs:36:9
       8:          0x1034465 - std::panicking::default_hook::{{closure}}::h5ad01a85289feef4
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:208:50
       9:          0x1033fc3 - std::panicking::default_hook::h08254923b362a124
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:225:9
      10:          0x1034c01 - std::panicking::rust_panic_with_hook::hf455788adcc6037d
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:591:17
      11:          0x1034747 - std::panicking::begin_panic_handler::{{closure}}::h77f62bd790d73507
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:497:13
      12:          0x10325dc - std::sys_common::backtrace::__rust_end_short_backtrace::h425b40ec298ee3a1
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys_common/backtrace.rs:141:18
      13:          0x10346a9 - rust_begin_unwind
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/panicking.rs:493:5
      14:          0x1075961 - core::panicking::panic_fmt::h1a635ccd39b86574
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/core/src/panicking.rs:92:14
      15:          0x10756f3 - core::option::expect_failed::ha87475f95863321c
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/core/src/option.rs:1292:5
      16:           0x54e65f - tokio::runtime::blocking::pool::spawn_blocking::h948597f852164303
      17:           0x43b7aa - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h28a4e146992a07ba
      18:           0x44bacc - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h9086e5a8b0a1ea32
      19:           0x55885b - <actix_web::handler::HandlerServiceResponse<T,R> as core::future::future::Future>::poll::hf99f402f5e2ac2ad
      20:           0x582ee7 - <actix_web::handler::ExtractResponse<T,S> as core::future::future::Future>::poll::h00221b1dce674f00
      21:           0x4d5515 - <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll::h28fc1776b1efbcca
      22:           0x4d4cb9 - <futures_util::future::future::Map<Fut,F> as core::future::future::Future>::poll::h6bd969c979888f5a
      23:           0xdc46c1 - <core::pin::Pin<P> as core::future::future::Future>::poll::he41b5249af7b482a
      24:           0x61442f - <futures_util::future::either::Either<A,B> as core::future::future::Future>::poll::h5be6bc862ca0dac2
      25:           0x43e2ad - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h42cc8f570f27bf98
      26:           0x58909d - <actix_web::middleware::logger::LoggerResponse<S,B> as core::future::future::Future>::poll::hd05829a343667aba
      27:           0x5b9269 - actix_http::h1::dispatcher::InnerDispatcher<T,S,B,X,U>::poll_response::hb39b55966b679030
      28:           0x52b384 - <actix_http::h1::dispatcher::Dispatcher<T,S,B,X,U> as core::future::future::Future>::poll::hd30b7a9c0dd75c84
      29:           0x4f67e1 - <actix_service::and_then::AndThenServiceResponse<A,B> as core::future::future::Future>::poll::h52b597d7835251cc
      30:           0x44c46f - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h984a60181ba545e6
      31:           0x46137a - <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once::h0badf3bccd13ff6f
      32:           0x4ecfdc - tokio::runtime::task::raw::poll::ha440b3bbfc95d746
      33:           0xfc95c3 - std::thread::local::LocalKey<T>::with::hb9b119d47c737a68
      34:           0xfe2a07 - tokio::task::local::LocalSet::tick::h50d53f76f886c843
      35:           0xf5731a - tokio::macros::scoped_tls::ScopedKey<T>::set::h2b8525658211642e
      36:           0xf5d74b - <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h5b091028af80f405
      37:           0xf59f72 - std::thread::local::LocalKey<T>::with::hfa0971c26e7ac9e5
      38:           0xf574e5 - tokio::macros::scoped_tls::ScopedKey<T>::set::h82ceec5494a6f0fb
      39:           0xf5d648 - tokio::runtime::basic_scheduler::BasicScheduler<P>::block_on::hc3cac2796d9982f2
      40:           0xf445bf - tokio::runtime::context::enter::hed4c7f17f1bcdcb8
      41:           0xf59acf - std::sys_common::backtrace::__rust_begin_short_backtrace::hcfe22e4e5d1b5f66
      42:           0xf529c3 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hfbc3c3a33de52672
      43:          0x103ca7a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h04fa9632ed2971ec
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/alloc/src/boxed.rs:1548:9
      44:          0x103ca7a - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h26f394c18ccce17c
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/alloc/src/boxed.rs:1548:9
      45:          0x103ca7a - std::sys::unix::thread::Thread::new::thread_start::h3dc2fd766800d863
                                   at /rustc/3f5aee2d5241139d808f4fdece0026603489afd1/library/std/src/sys/unix/thread.rs:71:17
    
    bug 
    opened by shyim 1
Owner
Revolt
User-first chat platform built with modern web technologies.
Revolt
Download .crate files of all versions of all crates from crates.io

get-all-crates Download .crate files of all versions of all crates from crates.io. Useful for things like noisy-clippy which need to analyze the sourc

David Tolnay 18 Jan 3, 2023
Share files between devices using your Wi-Fi network.

swift_file Rust implementation of transferring files between devices over Wi-Fi network using a QR code. Tool is inspired by claudiodangelis/qrcp. How

Mateo Radman 10 Jun 7, 2023
A Google-like web search engine that provides the user with the most relevant websites in accordance to his/her query, using crawled and indexed textual data and PageRank.

Mini Google Course project for the Architecture of Computer Systems course. Overview: Architecture: We are working on multiple components of the web c

Max 11 Aug 10, 2022
Ergonomic and modular web framework built with Tokio, Tower, and Hyper

axum axum is a web application framework that focuses on ergonomics and modularity. More information about this crate can be found in the crate docume

Tokio 7.9k Dec 31, 2022
Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json file and discord webhook.

minecraft-honeypot Proxies all incoming connections to a minecraft server of your choosing, while also logging all ping and login requests to a json f

Cleo 19 Jan 4, 2023
A simple authentication flow using Rust and Actix-web, with a PostgreSQL database and a sveltekit frontend.

Rust-auth-example This repository aims to represent a simple authentication flow using Rust and Actix-web, with a PostgreSQL database and a sveltekit

Kival Mahadew 4 Feb 19, 2023
A secure and efficient gateway for interacting with OpenAI's API, featuring load balancing, user request handling without individual API keys, and global access control.

OpenAI Hub OpenAI Hub is a comprehensive and robust tool designed to streamline and enhance your interaction with OpenAI's API. It features an innovat

Akase Cho 30 Jun 16, 2023
Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome! Ping us on gitter to know more

Sōzu · Sōzu is a lightweight, fast, always-up reverse proxy server. Why use Sōzu? Hot configurable: Sozu can receive configuration changes at runtime

sōzu 2k Dec 30, 2022
A html document syntax and operation library written in Rust, use APIs similar to jQuery.

Visdom A server-side html document syntax and operation library written in Rust, it uses apis similar to jQuery, left off the parts thoes only worked

轩子 80 Dec 21, 2022
Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix Web is a powerful, pragmatic, and extremely fast web framework for Rust.

Actix 16.2k Jan 2, 2023
A rust web framework with safety and speed in mind.

darpi A web api framework with speed and safety in mind. One of the big goals is to catch all errors at compile time, if possible. The framework uses

null 32 Apr 11, 2022
Markdown LSP server for easy note-taking with cross-references and diagnostics.

Zeta Note is a language server that helps you write and manage notes. The primary focus is to support Zettelkasten-like1, 2 note taking by providing an easy way to cross-reference notes (see more about features below).

Artem Pyanykh 4 Oct 27, 2022
Volt - A powerful, fast and memory safe package manager for the web

Volt - A powerful, fast and memory safe package manager for the web

Volt Package Manager 811 Dec 30, 2022
Thruster - An fast and intuitive rust web framework

A fast, middleware based, web framework written in Rust

null 913 Dec 27, 2022
A full-featured and easy-to-use web framework with the Rust programming language.

Poem Framework A program is like a poem, you cannot write a poem without writing it. --- Dijkstra A full-featured and easy-to-use web framework with t

Poem Web 2.2k Jan 6, 2023
Seed is a Rust front-end framework for creating fast and reliable web apps with an Elm-like architecture.

Seed is a Rust front-end framework for creating fast and reliable web apps with an Elm-like architecture.

null 3.6k Jan 6, 2023
Murasaki is a Fast, Secure, and Reliable Webkit based web browser.

Murasaki is a Fast, Secure, and Reliable Webkit based web browser. Table of Contents Goals Status Usage License Goals Security: Be secure, and not com

Moon Laboratories 5 Nov 17, 2021
example of a full stack web app (backend and frontend) wrtiten in Rust

rust-fullstack-example An example of creating a full stack web application (backend and frontend) using Rust. Backend Go to ./backend and start the se

mario 41 Dec 16, 2022
☁ file.AsyncWrite - because THEY wont do it!!!!!! and its in RUST

☁ gm_async_write Simple module that adds file.AsyncWrite and file.AsyncAppend to Garry's Mod. These functions are mostly based off file.AsyncRead and

William 18 Dec 24, 2022