-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Static files aren't getting served properly in case of nesting after embedding them in binary #1391
Comments
Templates are embedded using the 'view.Binary' method, static files through 'app.HandleDir'. I will check your code as soon as I come back to my town office but I dont think there is an issue with embedded files because they are working properly in our servers. We'll talk later on if you still have the issue. |
Thank you for your response. I can also confirm that the pattern I have described in above zip file works very well in fairly large project with version v11.2.8. But I started encountering this when I attempted to migrate it to v12.x.x |
Hello @ansrivas, you are very welcome. I thank you for using Iris for so long time! It shouldn't work on v11.2.8, the only change on static file serving was at: #1383. I think you are mistaken - actually the problem is that you serve See your // Code generated by go-bindata. DO NOT EDIT.
// sources:
// assets/static/css/bootstrap.min.css
// assets/static/js/jquery-2.1.1.js ^ Here More: Based on the Solution You need to run // Code generated by go-bindata. DO NOT EDIT.
// sources:
// static\css\bootstrap.min.css
// static\js\jquery-2.1.1.js The below is working (see the terminal panel), Iris ties to* locate and validate the embedded assets based on the 'virtual directory' given by the second parameter of |
@kataras thank you for this detailed explanation. |
Glad to help @ansrivas! |
Hi, I have recently upgraded to v12.0.1 and started experiencing the issue that static files are not getting served properly. My scenario is like this:
go-bindata
but with custompkg
name andoutput
dir.When I try to access the static files, I get 404.
I am attaching a very simple project to replicate the issue.
iris-static-issue.zip
Steps:
The text was updated successfully, but these errors were encountered: