nuxt-upload-kit 0.1.12 → 0.1.13

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.
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-upload-kit",
3
3
  "configKey": "uploadKit",
4
- "version": "0.1.12",
4
+ "version": "0.1.13",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -201,8 +201,10 @@ This is deprecated. Use the 'storage' option instead:
201
201
  remoteUrl: remoteFileData.remoteUrl,
202
202
  preview: remoteFileData.preview || file.preview || remoteFileData.remoteUrl,
203
203
  // Use preview from storage, passed-in value, or fallback to remoteUrl
204
- source: "storage"
204
+ source: "storage",
205
205
  // File loaded from remote storage
206
+ // Set uploadResult for consistency with newly uploaded files
207
+ uploadResult: remoteFileData.uploadResult
206
208
  };
207
209
  return existingFile;
208
210
  })
@@ -119,7 +119,12 @@ export const PluginAzureDataLake = defineStorageAdapter((options) => {
119
119
  return {
120
120
  size: properties.contentLength || 0,
121
121
  mimeType: properties.contentType || "application/octet-stream",
122
- remoteUrl: fileClient.url
122
+ remoteUrl: fileClient.url,
123
+ // Include uploadResult for consistency with newly uploaded files
124
+ uploadResult: {
125
+ url: fileClient.url,
126
+ blobPath: fileClient.name
127
+ }
123
128
  };
124
129
  }, `Get remote file "${fileId}"`);
125
130
  },
@@ -509,10 +509,16 @@ export type Processor = (file: UploadFile) => Promise<File | Blob>;
509
509
  export interface UploadBlob {
510
510
  blobPath: string;
511
511
  }
512
- type MinimumRemoteFileAttributes = {
512
+ export type MinimumRemoteFileAttributes<TUploadResult = any> = {
513
513
  size: number;
514
514
  mimeType: string;
515
515
  remoteUrl: string;
516
516
  preview?: string;
517
+ /**
518
+ * Optional upload result from storage plugin.
519
+ * When provided, this will be set on initialized files for consistency
520
+ * with newly uploaded files, eliminating the need for special handling.
521
+ */
522
+ uploadResult?: TUploadResult;
517
523
  };
518
524
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-upload-kit",
3
- "version": "0.1.12",
3
+ "version": "0.1.13",
4
4
  "description": "A powerful, plugin-based file upload manager for Nuxt applications",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/genu/nuxt-upload-kit.git",