-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Den dev #74
Conversation
…ments in Scan, not 6#72
Display logged user inside threads
the work on last commit is still in progress. Adding buttons to edit delete main topic (thread) |
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.
m.PostLen
we have AppConfig struct
// Repository handles the repository type, encapsulating the AppConfig and DatabaseInt dependencies.
type Repository struct {
App *config.AppConfig
DB repository.DatabaseInt
}
I an on internal/handler/themeHandler.go now
if len(post.Content) > 1500 { lets aslo store this value in settings, and all value like :1<<20, 2<<20
func AttachFile(w http.ResponseWriter, r *http.Request, post *models.Post, thread *models.Thread) {
// ADD IMAGE TO STATIC_________________________
// Get the file from the form data
file, handler, errFileGet := r.FormFile("image")
if errFileGet == nil {
defer file.Close()
// Validate file size (1 MB limit)
if handler.Size > 2<<20 {
setErrorAndRedirect(w, r, "File size should be below 2 MB", "/error-page")
return
}
post *models.Post, thread *models.Thread - This is strange
1 mb != 2<<20
// Validate file size (1 MB limit)
if handler.Size > 2<<20 {
internal/handler/staticHelperHendlers.go
// Repository handles the repository type, encapsulating the AppConfig and DatabaseInt dependencies.
too many changes - no coments
I an on internal/handler/staticHelperHendlers.go now
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.
This branch has conflicts that must be resolved
Use the web editor or the to resolve conflicts.
Conflicting files
internal/handler/themeHandler.go
internal/repository/sql.go
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.
internal/handler/t
// Validate file size (1 MB limit)
if handler.Size > 2<<20 {hemeHandler.go
// Create a new file in the "static/post_images" directory
newFilePath := filepath.Join("static/post_images", handler.Filename)
this is image for the theme?
internal/repository/dbrepo/sqllite.go
if len(post.Content) > 2500 {
return errors.New("the post is to long, 2500 syblos allowed")
previously it was 1500? why here is 2500?
template/home.page.html
did you manage to format the time?
template/theme.page.html
Image: (Max 20 MB), allowed formats jpeg, png, gif.
20 mb is it true?
did you manage to format the time? |
…; cleaned header for topic / post edit page.
finished. Description is in commit comment.
|
No description provided.