mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-25 03:42:02 +00:00
add debug logs while detecting content type
This commit is contained in:
@@ -103,6 +103,9 @@ func (m *Manager) UploadAndInsert(srcFilename, contentType, contentID string, mo
|
||||
|
||||
// Upload saves the media file to the storage backend - returns the generated filename and content type (after detection).
|
||||
func (m *Manager) Upload(fileName, contentType string, content io.ReadSeeker) (string, string, error) {
|
||||
// On store file is named by UUID to avoid collisions and the actual filename is stored in DB.
|
||||
m.lo.Debug("detecting content type for file before upload", "uuid", fileName, "source_content_type", contentType)
|
||||
|
||||
// Detect content type and override if needed.
|
||||
contentType, err := m.detectContentType(contentType, content)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user