Skip to content

Commit 3ed7bdd

Browse files
committed
fix: fix upload path
1 parent 59b22f9 commit 3ed7bdd

File tree

16 files changed

+56
-30
lines changed

16 files changed

+56
-30
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ components/demos
99
dist
1010
logs
1111
assets/data
12+
.vercel

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node-options="--openssl-legacy-provider --max_old_space_size=4096"

api/upload.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
export const config = {
2+
runtime: 'edge'
3+
}
4+
5+
export default async function handler () {
6+
return new Response(
7+
JSON.stringify({
8+
success: true
9+
}),
10+
{
11+
status: 200,
12+
headers: {
13+
'content-type': 'application/json'
14+
}
15+
}
16+
)
17+
}

one/docs/demo/uploader/controls.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-model="images"
66
:controls="controls"
77
type="image"
8-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
8+
action="/api/upload"
99
@star="handleStar"
1010
/>
1111
</section>

one/docs/demo/uploader/custom.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
:upload="upload"
1111
@moveright="handleMoveRight"
1212
>
13-
<template #desc>
13+
<template #help>
1414
点击图片浮层上的向右箭头按钮改变图片位置
1515
</template>
1616
</veui-uploader>
@@ -27,7 +27,7 @@ export default {
2727
},
2828
data () {
2929
return {
30-
action: 'https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog',
30+
action: '/upload',
3131
images: [
3232
{
3333
key: 0,

one/docs/demo/uploader/entries.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
v-model="images"
66
:entries="entries"
77
type="image"
8-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
8+
action="/api/upload"
99
@star="handleStar"
1010
/>
1111
</section>

one/docs/demo/uploader/file.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<h4>Normal size</h4>
55
<veui-uploader
66
v-model="files"
7-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
7+
action="/api/upload"
88
/>
99
</section>
1010
<section>
1111
<h4>Small size</h4>
1212
<veui-uploader
1313
v-model="files2"
14-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
14+
action="/api/upload"
1515
ui="s"
1616
/>
1717
</section>

one/docs/demo/uploader/help.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
v-model="files"
1414
:help-position="helpPosition"
1515
help="Help text"
16-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
16+
action="/api/upload"
1717
/>
1818
<veui-uploader
1919
v-model="files"
2020
:help-position="helpPosition"
21-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
21+
action="/api/upload"
2222
>
23-
<template #help>Custom help text via `help` slot</template>
23+
<template #help>
24+
Custom help text via `help` slot
25+
</template>
2426
</veui-uploader>
2527
</section>
2628
</article>

one/docs/demo/uploader/image.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<veui-uploader
66
v-model="images"
77
type="image"
8-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
8+
action="/api/upload"
99
>
10-
<template #desc>
10+
<template #help>
1111
Normal size
1212
</template>
1313
</veui-uploader>
@@ -17,10 +17,10 @@
1717
<veui-uploader
1818
v-model="images2"
1919
type="image"
20-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
20+
action="/api/upload"
2121
ui="s"
2222
>
23-
<template #desc>
23+
<template #help>
2424
Small size
2525
</template>
2626
</veui-uploader>

one/docs/demo/uploader/media.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<veui-uploader
66
v-model="media"
77
type="media"
8-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
8+
action="/api/upload"
99
>
10-
<template #desc>
10+
<template #help>
1111
Normal size
1212
</template>
1313
</veui-uploader>
@@ -17,10 +17,10 @@
1717
<veui-uploader
1818
v-model="media2"
1919
type="media"
20-
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
20+
action="/api/upload"
2121
ui="s"
2222
>
23-
<template #desc>
23+
<template #help>
2424
Small size
2525
</template>
2626
</veui-uploader>

0 commit comments

Comments
 (0)