@quatrain/storage-supabase 1.2.9 → 1.2.10-pr25.3663

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.
@@ -205,7 +205,7 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
205
205
  // La variable publicCacheDuration / cacheControl n'est donc pas gérée correctement ici pour le moment.
206
206
  // Voir si le SDK de Supabase permet de la supporter dans le futur.
207
207
  let download = false;
208
- const isVideoOrAudio = file.contentType && (file.contentType.startsWith('video/') || file.contentType.startsWith('audio/'));
208
+ const isMediaStream = this.isVideoOrAudio(file);
209
209
  if (action === 'download') {
210
210
  download = true;
211
211
  }
@@ -221,7 +221,7 @@ class SupabaseStorageAdapter extends storage_1.AbstractStorageAdapter {
221
221
  download = true;
222
222
  }
223
223
  }
224
- else if (!isVideoOrAudio) {
224
+ else if (!isMediaStream) {
225
225
  // Default to download=true for non-media files (images, documents) to preserve historical behavior
226
226
  download = true;
227
227
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quatrain/storage-supabase",
3
- "version": "1.2.9",
3
+ "version": "1.2.10-pr25.3663",
4
4
  "description": "Storage adapter for Supabase Storage",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,8 +31,8 @@
31
31
  "typescript": "^5.1.5"
32
32
  },
33
33
  "dependencies": {
34
- "@quatrain/core": "^1.2.16",
35
- "@quatrain/storage": "^1.2.12",
34
+ "@quatrain/core": "^1.2.18",
35
+ "@quatrain/storage": "^1.2.13",
36
36
  "@supabase/storage-js": "^2.7.2",
37
37
  "@supabase/supabase-js": "^2.108.2"
38
38
  },
@@ -215,7 +215,7 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
215
215
  // Voir si le SDK de Supabase permet de la supporter dans le futur.
216
216
 
217
217
  let download: boolean | string = false
218
- const isVideoOrAudio = file.contentType && (file.contentType.startsWith('video/') || file.contentType.startsWith('audio/'))
218
+ const isMediaStream = this.isVideoOrAudio(file)
219
219
 
220
220
  if (action === 'download') {
221
221
  download = true
@@ -228,7 +228,7 @@ export class SupabaseStorageAdapter extends AbstractStorageAdapter {
228
228
  } else {
229
229
  download = true
230
230
  }
231
- } else if (!isVideoOrAudio) {
231
+ } else if (!isMediaStream) {
232
232
  // Default to download=true for non-media files (images, documents) to preserve historical behavior
233
233
  download = true
234
234
  }