Ticket #4795 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Upload files without file extensions

Reported by: roehricht@tm.uka.de Assigned to: Blackhex
Priority: normal Component: DownloadsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

It should be possible to upload files like "CHANGELOG" that have no proper file extensions, i.e. instead of renaming the file to CHANGELOG.txt.

Attachments

Change History

04/23/09 14:17:29 changed by dylanj

Has anyone had any luck with this yet?

04/23/09 14:30:41 changed by dylanj

Actually I found a solution but that takes away the extension filtering... Sorry i'm not really a python developer... but you can do this in the mean time : in the dist open the api.py file and look for this section :

# Check correct file type.

reg = re.compile(r'(.*).(.*)$') result = reg.match(downloadfile?) self.log.debug('ext: %s' % (result.group(2))) if result:

if not result.group(2).lower() in self.ext.split(' '):

raise TracError?('Unsupported uploaded file type.')

else:

raise TracError?('Unsupported uploaded file type.')

Comment all of that out, then just reinstall it... simple solution:P

04/23/09 14:35:44 changed by Blackhex

  • status changed from new to assigned.

I'll add trac.ini opiton value none which will allow uploading of files with no extension. Just wait for it.

05/08/09 23:07:19 changed by Blackhex

  • status changed from assigned to closed.
  • resolution set to fixed.

Branch 0.11 and 0.12 now contains two new values of ext trac.ini option. They are none which allow to upload files without extension and all which disables file extension check.


Add/Change #4795 (Upload files without file extensions)




Change Properties
Action