baserow_rs/api/
file.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
pub struct Thumbnail {
    pub url: String,
    pub width: u32,
    pub height: u32,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct Thumbnails {
    pub tiny: Thumbnail,
    pub small: Thumbnail,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct File {
    pub url: String,
    pub thumbnails: Thumbnails,
    pub name: String,
    pub size: u64,
    pub mime_type: String,
    pub is_image: bool,
    pub image_width: u32,
    pub image_height: u32,
    pub uploaded_at: String,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct UploadFileViaUrlRequest {
    pub url: String,
}