Fixed download_multi
All checks were successful
/ Build the server (push) Successful in 2m29s

This commit is contained in:
Mutzi 2025-01-12 14:29:47 +01:00
parent 902501f2b7
commit 14520fbce8
Signed by: root
GPG Key ID: 2437494E09F13876
2 changed files with 3 additions and 1 deletions

View File

@ -86,7 +86,7 @@ export async function download<T extends {id:number, file:boolean}>(nodes: T[])
form.innerHTML += `<input type="hidden" name="node" value="${nodes[0].id}">`; form.innerHTML += `<input type="hidden" name="node" value="${nodes[0].id}">`;
} else { } else {
form.action = '/api/public/download_multi'; form.action = '/api/public/download_multi';
form.innerHTML += `<input type="hidden" name="nodes" value="${nodes.map(n => n.id).join('.')}">`; form.innerHTML += `<input type="hidden" name="nodes" value="${nodes.map(n => n.id).join(',')}">`;
const resp = await workingWrapper(() => rpc.getNodesSize(nodes.map(v => v.id))); const resp = await workingWrapper(() => rpc.getNodesSize(nodes.map(v => v.id)));
if (!resp) if (!resp)
return; return;

View File

@ -9,6 +9,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters; import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;
import org.springframework.http.HttpOutputMessage; import org.springframework.http.HttpOutputMessage;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotWritableException; import org.springframework.http.converter.HttpMessageNotWritableException;
@ -52,6 +53,7 @@ public class FileServerApplication {
} }
@Bean @Bean
@Profile("!dev")
public FilterRegistrationBean<Filter> nonApiToIndex() { public FilterRegistrationBean<Filter> nonApiToIndex() {
return new FilterRegistrationBean<>((servletRequest, servletResponse, chain) -> { return new FilterRegistrationBean<>((servletRequest, servletResponse, chain) -> {
String uri = ((HttpServletRequest) servletRequest).getRequestURI(); String uri = ((HttpServletRequest) servletRequest).getRequestURI();