Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page
Ask Your Question
9

Can we allow more file types to be uploaded, such as IDF, CSV, etc.?

asked 2015-08-30 03:37:12 -0500

updated 2015-11-07 14:11:05 -0500

Currently if I try to upload a file type which is not a standard image file I get the following error.

image description

It would be useful to be able to upload IDF files, as well as other file types such as EnergyPlus outputs, OSM files, etc.

It's currently possible to upload an IDF (or any other file type) by changing the extension it, e.g. <my_file_name>.idf becomes <my_file_name>.jpg, which seems to negate any security benefits of blocking arbitrary file uploads (while also providing a hacky workaround).

Example:
C:\fakepath\IDF.jpg - right-click and save as IDF.idf.

I see two things that could happen:

  1. Fix the renamed file workaround by actually checking filetype (with file on Linux or TrID on Windows) rather than trusting the extension, and provide/recommend some other standard way of sharing files

  2. Allow arbitrary file uploads - up to a size limit? - disallow executables? - and warn downloaders that they are downloaded at their own risk (as with any other file on the internet)

I'm sure there are other options but I wanted to get the idea out there.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-09-22 02:46:26 -0500

updated 2015-09-22 02:57:11 -0500

I would say that this would be very useful indeed, and I'd say 7 votes on a meta request makes it definitely 'trending''.

I'm not sure what is possible or not directly on Askbot, @NealKruis?


If it's not possible, or as an alternate solution in the meantime - instead of using any other upload service such as Dropbox, Google Drive, WeTransfer, etc - you can always use the UnmetHours Slack (see my answer here regarding how to join), to upload a file, then create a public link to it.

You just have to drag and drop your file to slack, then click on '...' (more) and select 'Create public link'

image description

Then you can just add it to your post:

edit flag offensive delete link more

Comments

Digging in the crates here... This can be done by adding extensions to ASKBOT_ALLOWED_UPLOAD_FILE_TYPES in the django settings.py.

Jamie Bull gravatar image Jamie Bull  ( 2018-02-19 10:38:35 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

 

Question Tools

1 follower

Stats

Asked: 2015-08-30 03:37:12 -0500

Seen: 203 times

Last updated: Sep 22 '15