@adminforth/upload 2.11.0 → 2.11.1

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
@@ -11,5 +11,5 @@ custom/preview.vue
11
11
  custom/tsconfig.json
12
12
  custom/uploader.vue
13
13
 
14
- sent 53,878 bytes received 134 bytes 108,024.00 bytes/sec
15
- total size is 53,396 speedup is 0.99
14
+ sent 54,028 bytes received 134 bytes 108,324.00 bytes/sec
15
+ total size is 53,539 speedup is 0.99
@@ -84,7 +84,10 @@ onMounted(async () => {
84
84
  if (Array.isArray(url.value)) return;
85
85
  try {
86
86
  const response = await fetch(url.value, {
87
- method: 'HEAD',
87
+ method: 'GET',
88
+ headers: {
89
+ Range: 'bytes=0-0' // this approach is better then HEAD in terms of CDN/CORS, but same for efficiency as HEAD
90
+ },
88
91
  mode: 'cors',
89
92
  });
90
93
  const ct = response.headers.get('Content-Type');
@@ -84,7 +84,10 @@ onMounted(async () => {
84
84
  if (Array.isArray(url.value)) return;
85
85
  try {
86
86
  const response = await fetch(url.value, {
87
- method: 'HEAD',
87
+ method: 'GET',
88
+ headers: {
89
+ Range: 'bytes=0-0' // this approach is better then HEAD in terms of CDN/CORS, but same for efficiency as HEAD
90
+ },
88
91
  mode: 'cors',
89
92
  });
90
93
  const ct = response.headers.get('Content-Type');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/upload",
3
- "version": "2.11.0",
3
+ "version": "2.11.1",
4
4
  "description": "Plugin for uploading files for adminforth",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",