@studious-lms/server 1.1.20 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"thumbnailGenerator.d.ts","sourceRoot":"","sources":["../../src/lib/thumbnailGenerator.ts"],"names":[],"mappings":"AAiDA;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4BlG;AA4CD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0BlG;AAED;;;;;;GAMG;AACH,wBAAsB,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAgBvH"}
1
+ {"version":3,"file":"thumbnailGenerator.d.ts","sourceRoot":"","sources":["../../src/lib/thumbnailGenerator.ts"],"names":[],"mappings":"AAiDA;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CA4BlG;AA4CD;;;;;GAKG;AACH,wBAAsB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA0BlG;AAED;;;;;;GAMG"}
@@ -1,6 +1,5 @@
1
1
  import sharp from 'sharp';
2
- import { prisma } from './prisma.js';
3
- import { uploadFile, getSignedUrl } from './googleCloudStorage.js';
2
+ import { getSignedUrl } from './googleCloudStorage.js';
4
3
  // Thumbnail size configuration
5
4
  const THUMBNAIL_WIDTH = 200;
6
5
  const THUMBNAIL_HEIGHT = 200;
@@ -155,18 +154,5 @@ export async function generateThumbnail(fileName, fileType) {
155
154
  * @param userId The user ID who owns the file
156
155
  * @returns The ID of the created thumbnail File
157
156
  */
158
- export async function storeThumbnail(thumbnailBuffer, originalFileName, userId) {
159
- // Convert buffer to base64 for uploadFile function
160
- const base64Data = `data:image/jpeg;base64,${thumbnailBuffer.toString('base64')}`;
161
- const thumbnailFileName = await uploadFile(base64Data, `thumbnails/${originalFileName}_thumb`, 'image/jpeg');
162
- // Create a new File entry for the thumbnail
163
- const newThumbnail = await prisma.file.create({
164
- data: {
165
- name: `${originalFileName}_thumb.jpg`,
166
- path: thumbnailFileName,
167
- type: 'image/jpeg',
168
- userId: userId,
169
- },
170
- });
171
- return newThumbnail.id;
172
- }
157
+ // DEPRECATED: This function is no longer used - thumbnails are generated during direct uploads
158
+ // Thumbnail generation is now handled in the direct upload flow