parent
3ff90ba4f3
commit
22fd211c7c
|
@ -24,3 +24,10 @@ jobs:
|
||||||
branch: 'main'
|
branch: 'main'
|
||||||
git_remote_url: 'ssh://dokku@v2.discours.io:22/quoter'
|
git_remote_url: 'ssh://dokku@v2.discours.io:22/quoter'
|
||||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
- name: Push to dokku
|
||||||
|
uses: dokku/github-action@master
|
||||||
|
with:
|
||||||
|
branch: 'dev'
|
||||||
|
git_remote_url: 'ssh://dokku@staging.discours.io:22/quoter'
|
||||||
|
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
@ -5,7 +5,9 @@ use crate::auth::{get_id_by_token, user_added_file};
|
||||||
use crate::s3_utils::{
|
use crate::s3_utils::{
|
||||||
check_file_exists, generate_key_with_extension, load_file_from_s3, upload_to_s3,
|
check_file_exists, generate_key_with_extension, load_file_from_s3, upload_to_s3,
|
||||||
};
|
};
|
||||||
use crate::thumbnail::{find_closest_width, generate_thumbnails, parse_thumbnail_request, ALLOWED_THUMBNAIL_WIDTHS};
|
use crate::thumbnail::{
|
||||||
|
find_closest_width, generate_thumbnails, parse_thumbnail_request, ALLOWED_THUMBNAIL_WIDTHS,
|
||||||
|
};
|
||||||
use actix_multipart::Multipart;
|
use actix_multipart::Multipart;
|
||||||
use actix_web::error::ErrorInternalServerError;
|
use actix_web::error::ErrorInternalServerError;
|
||||||
use actix_web::{web, HttpRequest, HttpResponse, Result};
|
use actix_web::{web, HttpRequest, HttpResponse, Result};
|
||||||
|
@ -158,6 +160,7 @@ pub async fn proxy_handler(
|
||||||
let thumbnails_bytes =
|
let thumbnails_bytes =
|
||||||
generate_thumbnails(&image, &ALLOWED_THUMBNAIL_WIDTHS).await?;
|
generate_thumbnails(&image, &ALLOWED_THUMBNAIL_WIDTHS).await?;
|
||||||
let thumbnail_bytes = thumbnails_bytes[&closest_width].clone();
|
let thumbnail_bytes = thumbnails_bytes[&closest_width].clone();
|
||||||
|
|
||||||
// Загружаем миниатюру в S3
|
// Загружаем миниатюру в S3
|
||||||
upload_to_s3(
|
upload_to_s3(
|
||||||
&state.s3_client,
|
&state.s3_client,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user