Enable raw code for final files with filemanager

Currently I have Caddy up and running in a test environment. The goal is to use it as a test HTTPS/HTTP server for downloading files to a VoIP phone. I would like to use the File Manager plugin to have a GUI to do this with; however, when the end files are returned they have the extra HTML code from file manager which causes problems with the endpoint downloading them. I can see just the file in raw code by pressing on the raw code button.

Is there a way to enable file uploads to a directory via File Manager but to allow the end result files to be displayed as raw code, and not with the extra code automatically?

@meistermann Try configuring 2 different URLs. 1) for filemanager to use 2) for the phones to use to get to raw files

example.com/files        // path for VoIP phones to download from
and
example.com/manage       // to manage the /files

Config example:

example.com {
   # filemanager path
   filemanager /manage {
     # file location on disk
     show /var/voip_files/
  }
}

# URL for phones to use
example.com/files/ {
 # file location on disk
  root /var/voip_files
  # optional to allow directory viewing manually
  browse 
}


See https://caddyserver.com/docs/filemanager for all the options

1 Like

Thanks that was precisely what I needed.

1 Like