@adminforth/upload 2.14.3 → 2.14.5

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/build.log CHANGED
@@ -12,5 +12,5 @@ custom/preview.vue
12
12
  custom/tsconfig.json
13
13
  custom/uploader.vue
14
14
 
15
- sent 68,568 bytes received 153 bytes 137,442.00 bytes/sec
16
- total size is 68,006 speedup is 0.99
15
+ sent 68,569 bytes received 153 bytes 137,444.00 bytes/sec
16
+ total size is 68,007 speedup is 0.99
@@ -175,7 +175,7 @@ onMounted(async () => {
175
175
  if (!uploaded.value && props.record?.[previewColumnName]) {
176
176
  if (Array.isArray(props.record[previewColumnName]) && props.record[previewColumnName].length > 0) {
177
177
  const resp = await callAdminForthApi({
178
- path: `/plugin/${props.meta.pluginInstanceId}/get-file-preview-url`,
178
+ path: `/plugin/${props.meta.pluginInstanceId}/get-file-download-url`,
179
179
  method: 'POST',
180
180
  body: { filePath: existingFilePath },
181
181
  });
@@ -175,7 +175,7 @@ onMounted(async () => {
175
175
  if (!uploaded.value && props.record?.[previewColumnName]) {
176
176
  if (Array.isArray(props.record[previewColumnName]) && props.record[previewColumnName].length > 0) {
177
177
  const resp = await callAdminForthApi({
178
- path: `/plugin/${props.meta.pluginInstanceId}/get-file-preview-url`,
178
+ path: `/plugin/${props.meta.pluginInstanceId}/get-file-download-url`,
179
179
  method: 'POST',
180
180
  body: { filePath: existingFilePath },
181
181
  });
package/dist/index.js CHANGED
@@ -306,7 +306,7 @@ export default class UploadPlugin extends AdminForthPlugin {
306
306
  var _a;
307
307
  this.adminforth = adminforth;
308
308
  if (this.options.generation) {
309
- const template = (_a = this.options.generation) === null || _a === void 0 ? void 0 : _a.generationPrompt;
309
+ const template = ((_a = this.options.generation) === null || _a === void 0 ? void 0 : _a.generationPrompt) || '';
310
310
  const regex = /{{(.*?)}}/g;
311
311
  const matches = template.match(regex);
312
312
  if (matches) {
package/index.ts CHANGED
@@ -358,7 +358,7 @@ export default class UploadPlugin extends AdminForthPlugin {
358
358
  this.adminforth = adminforth;
359
359
 
360
360
  if (this.options.generation) {
361
- const template = this.options.generation?.generationPrompt;
361
+ const template = this.options.generation?.generationPrompt || '';
362
362
  const regex = /{{(.*?)}}/g;
363
363
  const matches = template.match(regex);
364
364
  if (matches) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/upload",
3
- "version": "2.14.3",
3
+ "version": "2.14.5",
4
4
  "description": "Plugin for uploading files for adminforth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",