Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set max file sizes #47

Merged
merged 3 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ import org.slf4j.LoggerFactory
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration
import org.springframework.boot.builder.SpringApplicationBuilder
import org.springframework.boot.context.event.ApplicationReadyEvent
import org.springframework.boot.runApplication
import org.springframework.context.annotation.Bean
import org.springframework.context.event.EventListener
import org.springframework.core.io.ClassPathResource
import org.springframework.jdbc.core.JdbcTemplate
import org.springframework.jdbc.datasource.init.ScriptUtils
import org.springframework.web.servlet.DispatcherServlet
import java.util.Properties
import javax.sql.DataSource

@SpringBootApplication
Expand Down Expand Up @@ -55,5 +56,10 @@ class FileSpiderApplication {
}

fun main(args: Array<String>) {
runApplication<FileSpiderApplication>(*args)
val props = Properties()

props["spring.servlet.multipart.max-file-size"] = "1024MB"
props["spring.servlet.multipart.max-request-size"] = "1024MB"

SpringApplicationBuilder(FileSpiderApplication::class.java).properties(props).run(*args)
}
2 changes: 1 addition & 1 deletion client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ app.post('/document/:docId/edit', async (req, res) => {
res.send()
})

app.use('/', proxy(API_HOST))
app.use('/', proxy(API_HOST, { limit: '1024mb' }))

var server
async function startServer() {
Expand Down
2 changes: 2 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
server {
listen 80;
client_max_body_size 1024M;

location / {
proxy_pass 'http://filespider/';
proxy_no_cache on;
Expand Down