File tree Expand file tree Collapse file tree 7 files changed +55
-63
lines changed Expand file tree Collapse file tree 7 files changed +55
-63
lines changed Original file line number Diff line number Diff line change 14
14
},
15
15
"devDependencies" : {
16
16
"@sveltejs/adapter-auto" : " ^3.0.0" ,
17
- "@sveltejs/kit" : " ^2.0.0 " ,
17
+ "@sveltejs/kit" : " ^2.5.5 " ,
18
18
"@sveltejs/vite-plugin-svelte" : " ^3.0.0" ,
19
19
"prettier" : " ^3.1.1" ,
20
20
"prettier-plugin-svelte" : " ^3.1.2" ,
21
- "svelte" : " ^4.2.7 " ,
21
+ "svelte" : " ^4.2.12 " ,
22
22
"svelte-check" : " ^3.6.0" ,
23
23
"tslib" : " ^2.4.1" ,
24
24
"typescript" : " ^5.0.0" ,
Original file line number Diff line number Diff line change 31
31
align-items : center ;
32
32
flex : 1 ;
33
33
}
34
-
35
- h1 {
36
- width : 100% ;
37
- }
38
-
39
- .welcome {
40
- position : relative ;
41
- width : 100% ;
42
- height : 0 ;
43
- padding : 0 0 calc (100% * 495 / 2048 ) 0 ;
44
- }
45
-
46
- .welcome img {
47
- position : absolute ;
48
- width : 100% ;
49
- height : 100% ;
50
- top : 0 ;
51
- display : block ;
52
- }
53
34
</style >
Original file line number Diff line number Diff line change
1
+ export const actions = {
2
+ async postFiles ( { request } ) {
3
+ const formData : FormData = await request . formData ( ) ;
4
+ const files = formData . getAll ( 'files' ) ;
5
+
6
+ return { files } ;
7
+ }
8
+ } ;
Original file line number Diff line number Diff line change
1
+ <script lang =" ts" >
2
+ import { enhance } from ' $app/forms' ;
3
+ import { page } from ' $app/stores' ;
4
+ import Dropzone from ' ../../../../src/lib/components/Dropzone.svelte' ;
5
+
6
+ $ : console .log ($page .form );
7
+ </script >
8
+
9
+ <form method =" POST" action =" ?/postFiles" use:enhance enctype =" multipart/form-data" >
10
+ <Dropzone name =" files" />
11
+
12
+ <button >Go</button >
13
+ </form >
14
+
15
+ Files Posted:
16
+
17
+ <ul >
18
+ {#each [] as file }
19
+ <li >{file }</li >
20
+ {/each }
21
+ </ul >
Original file line number Diff line number Diff line change 37
37
align-items : center ;
38
38
flex : 1 ;
39
39
}
40
-
41
- h1 {
42
- width : 100% ;
43
- }
44
-
45
- .welcome {
46
- position : relative ;
47
- width : 100% ;
48
- height : 0 ;
49
- padding : 0 0 calc (100% * 495 / 2048 ) 0 ;
50
- }
51
-
52
- .welcome img {
53
- position : absolute ;
54
- width : 100% ;
55
- height : 100% ;
56
- top : 0 ;
57
- display : block ;
58
- }
59
40
</style >
Original file line number Diff line number Diff line change 40
40
"@storybook/addons" : " 7.6.6" ,
41
41
"@storybook/svelte" : " 7.6.6" ,
42
42
"@storybook/sveltekit" : " ^7.6.6" ,
43
- "@sveltejs/kit" : " ^1.30.3 " ,
43
+ "@sveltejs/kit" : " ^1.30.4 " ,
44
44
"@sveltejs/package" : " ^2.2.5" ,
45
45
"babel-loader" : " 9.1.3" ,
46
46
"publint" : " ^0.2.7" ,
47
47
"storybook" : " ^7.6.6" ,
48
- "svelte" : " ^4.2.8 " ,
48
+ "svelte" : " ^4.2.12 " ,
49
49
"vite" : " ^4.5.1"
50
50
},
51
51
"keywords" : [
You can’t perform that action at this time.
0 commit comments