TLTL;DR:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
and Svelte tutorial in this page, said about static folder
Any static assets that should be served as-is
So I think should not place dynamic, user generate content here
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here, but also other place you can access
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
TL:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
and Svelte tutorial in this page, said about static folder
Any static assets that should be served as-is
So I think should not place dynamic, user generate content here
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here, but also other place you can access
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
TL;DR:
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
and Svelte tutorial in this page, said about static folder
Any static assets that should be served as-is
So I think should not place dynamic, user generate content here
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here, but also other place you can access
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
My solution
TL:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
and Svelte tutorial in this page , said about static folder
Any static assets that should be served as-is
So I think should not place dynamic, user generate content here
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here, but also other place you can access
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
My solution
TL:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
TL:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
and Svelte tutorial in this page , said about static folder
Any static assets that should be served as-is
So I think should not place dynamic, user generate content here
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here, but also other place you can access
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js
My solution
TL:DR;
move out the upload image folder from static folder
because static folder will be complied by copying its contain files to build/client, and do somthing others
Project Structure
before
├ src
├ static
│ ├ images
│ │ └ (upload images here)
│ ├ favicon.svg
│ └ (other static files)
├ (other files)
after
├ src
├ static
│ ├ favicon.svg
│ └ (other static files)
├ uploadImages // new place, not only here
│ └ (upload images here)
├ (other files)
in this way, we can achieve many things:
- there is no difference between
devand other mode - we can make a configuation in
.envfile to select other folder - it can also handle by web server software, like
nginx, if I put it in like/opt/anonymous_board/upload_images, there is no need to serve the images byNode.js