-
Notifications
You must be signed in to change notification settings - Fork 33
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
Some changes to fix the path problem under windows system and android TAK client #20
base: master
Are you sure you want to change the base?
Conversation
kbtxwer
commented
Aug 25, 2024
- improve the body limit so that it can be able to send large files
- directly write the file to it path instead of using a tempfile to avoid the rename operation on windows because it is easy going wrong
- modified the "getMetadataGetHandler" function to keep the same performance as the FreeTAKServer
- use "ctx.BaseURL() + packageUrl(pi)" instead of "packageUrl(pi)" because my tak client cannot determine which server to connect when the url is not given as full path, even when there is only one server connected. The FreeTAKServer also returns the full path url.
2. directly write the file to it path instead of using a tempfile to avoid the rename operation on windows because it is easy going wrong 3. modified the "getMetadataGetHandler" function to keep the same performance as the FreeTAKServer 4. use "ctx.BaseURL() + packageUrl(pi)" instead of "packageUrl(pi)" because my tak client cannot determine which server to connect when the url is not given as full path, even when there is only one server connected. The FreeTAKServer also returns the full path url.
…ile path which will raise 404 error during access from web 2. EMBED webtak into the program 3. register webTakPathHandler to redirect /webtak to /webtak/ to avoid issues
…r single cast message to all feds
|
|
||
addMartiRoutes(app, api.f) | ||
} else { | ||
staticfiles.EmbedWebTak(api.f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't want to use /webtak handle at all if it's not a webtacRoot
} | ||
|
||
func (c *PathUnescapeFs) Open(name string) (http.File, error) { | ||
// 解码路径中的空格 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please use english comments only
@@ -11,9 +12,33 @@ import ( | |||
//go:embed static | |||
var staticFiles embed.FS | |||
|
|||
//go:embed webtak | |||
var webtakFiles embed.FS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not embed webtak in the binary