fix: send non-JPEG images as document instead of photo; fix Dockerfile home.html path
Deploy FileDrop / deploy (push) Failing after 23s
Deploy FileDrop / deploy (push) Failing after 23s
- getFileType: only classify image/jpeg as 'photo'; png/gif/webp → 'document' (Telegram Bot API rejects non-JPEG for sendPhoto) - Dockerfile: copy home.html to dist/ instead of root (import.meta.dir = dist/) - Update test assertion for getFileType(image/png) → 'document'
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ describe('File Utilities', () => {
|
||||
|
||||
it('should classify image mime types based on caption', () => {
|
||||
expect(getFileType('image/jpeg', 'my photo')).toBe('photo');
|
||||
expect(getFileType('image/png', 'cool image.png')).toBe('photo');
|
||||
expect(getFileType('image/png', 'cool image.png')).toBe('document');
|
||||
expect(getFileType('image/gif', 'funny.gif')).toBe('animation');
|
||||
expect(getFileType('image/png', 'funny gif')).toBe('animation');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user