Skip to content

Commit

Permalink
fixed env imports with AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
t-shah02 committed Feb 17, 2024
1 parent d5d3781 commit 8f399b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/server/aws/actions/s3.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PutObjectCommand, DeleteObjectCommand } from '@aws-sdk/client-s3';
import awsS3 from '../s3';
import type { TS3ObjectSource } from '$lib/server/types/aws';
import { AWS_CLOUDFRONT_PROFILE_PICTURE_BASE_URL, AWS_CLOUDFRONT_POSTS_BASE_URL } from '$env/static/private';
import { AWS_CLOUDFRONT_PROFILE_PICTURE_BASE_URL, AWS_CLOUDFRONT_POSTS_BASE_URL } from '$lib/server/constants/aws';

export const buildObjectUrl = (objectSource: TS3ObjectSource, objectId: string): string => {
const baseUrl =
Expand Down
4 changes: 2 additions & 2 deletions src/routes/posts/upload/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
import type { IUploadFormFields } from '$lib/shared/types/upload';
import { error, fail } from '@sveltejs/kit';
import type { Action, Actions } from './$types';
import { AWS_POST_PICTURE_BUCKET } from '$env/static/private';
import { AWS_POST_PICTURE_BUCKET_NAME } from '$lib/server/constants/aws';

const handleUpload: Action = async ({ locals, request }) => {
if (!locals.user) {
Expand Down Expand Up @@ -99,7 +99,7 @@ const handleUpload: Action = async ({ locals, request }) => {

const postImageFileBuffers = await runPostImageTransformationPipelineInBatch(postImagesArray);
const postImageUrls = await uploadBatchToBucket(
AWS_POST_PICTURE_BUCKET,
AWS_POST_PICTURE_BUCKET_NAME,
'posts',
postImageFileBuffers
);
Expand Down

0 comments on commit 8f399b3

Please sign in to comment.