asked 2010-09-30 07:33:12 -0500Benoit
I noticed that askbot support uploading of images, so presumably there is infrastructure in place to store binary blobs.
I would like to request support for generic attachments.
I realize we can use a link to a storage location, but it would be nice to have everything using the same front-end.
Not a huge priority, but definitely a nice feature to have in the context of a corporate site.
After thinking about this, I believe this feature could look like this:
I believe that would provide an acceptable way to upload (and link to) files.
Since we don't particularly care about images, but want links to uploaded files, with minor changes, we were able to implement this functionality.
Ctrl-G inserts a link instead of an image. Modify skins/default/media/js/wmd.js and in doLinkOrImage, around line 1742, remove the ! from the start tag to make it a link instead of embedding an image.
In views/writers.py, upload function, around line 59:
Definitely not appropriate for everyone, but it meets our need.
If this is functionality that askbot would want to provide in the regular release, I would suggest adding a new command/icon to WMD (ctrl-F for file or ctrl-U for upload?).
Probably would require a few more changes to upload to distinguish between images (and limiting extensions) and files (without limits).
edit: made this feature to work, but you still have to specify a list of uploaded file types in
settings.py file (in the parameter
ASKBOT_ALLOWED_UPLOAD_FILE_TYPES, also there is
ASKBOT_MAX_UPLOAD_FILE_SIZE - max file size in bytes.
The keyboard shortcut still does not work though (
Ctrl-F is probably not a good choice anyway).
This site only accepts pdf attachments.
Create your Q&A site at askbot.com. Managed Askbot hosting at just $15/mo. Dedicated hosting, support contracts, consulting services.create your Q&A site
Asked: 2010-09-30 07:33:12 -0500
Seen: 85 times
Last updated: Oct 25 '10