files.Create() and files.CreateWithMime() internally create their own sessions and transactions. When called from within an existing transaction (now that db.NewSession() auto-begins), this creates nested transactions that deadlock on SQLite. Switch to files.CreateWithSession() and files.CreateWithMimeAndSession() to participate in the caller's existing transaction instead. |
||
|---|---|---|
| .. | ||
| handler | ||
| unsplash | ||
| upload | ||
| background.go | ||