mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-06 21:46:24 -07:00
Finish migrating posting/post.go
This commit is contained in:
parent
585c54c772
commit
f5337896b2
2 changed files with 68 additions and 31 deletions
|
@ -43,6 +43,9 @@ func GetThreadFiles(post *Post) ([]Upload, error) {
|
|||
}
|
||||
|
||||
func (p *Post) AttachFile(upload *Upload) error {
|
||||
if upload == nil {
|
||||
return nil //
|
||||
}
|
||||
const query = `INSERT INTO DBPREFIXfiles (
|
||||
post_id, file_order, original_filename, filename, checksum, file_size,
|
||||
is_spoilered, thumbnail_width, thumbnail_height, width, height)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue