Commit Graph

130 Commits

Author SHA1 Message Date
08aa23f0ca FIX: lightbox wasn't working when using s3 upload 2013-06-22 13:38:42 +02:00
8a751e6e44 make sure we also delete optimized images 2013-06-21 09:34:02 +02:00
4a17d6dca6 added a rake task to clean orphan uploaded files 2013-06-19 21:51:41 +02:00
ae3543872c renamed the sha column to the proper sha1 2013-06-17 22:16:14 +02:00
454636abf1 annotate models 2013-06-17 02:49:34 +02:00
510bac4b27 refactored a bit & tested thumbnails creation 2013-06-17 02:49:34 +02:00
cc9e0ec80a create thumbnails when needed 2013-06-17 02:49:34 +02:00
5de03814fb created optimized_image model 2013-06-17 02:49:34 +02:00
2c3f757951 moved has_been_uploaded and uploaded_regex to the Upload model 2013-06-17 02:49:34 +02:00
8a98310cf9 make sure we only do the work once 2013-06-17 02:49:34 +02:00
6c4554b941 identifies all uploads with the SHA1 hash of the file content 2013-06-17 02:49:33 +02:00
6ea91b4416 remove useless upload topic direct association 2013-06-17 02:49:33 +02:00
037f62928b add proper post_uploads reverse index 2013-06-13 23:44:24 +02:00
770c1faeb1 added a reverse index of user uploads + rake task 2013-06-13 01:43:50 +02:00
8a2d635e62 removed imgur support 2013-06-11 21:51:41 +02:00
0d01c33482 Enabled strong_parameters across all models/controllers.
All models are now using ActiveModel::ForbiddenAttributesProtection, which shifts the responsibility for parameter whitelisting for mass-assignments from the model to the controller. attr_accessible has been disabled and removed as this functionality replaces that.

The require_parameters method in the ApplicationController has been removed in favor of strong_parameters' #require method.

It is important to note that there is still some refactoring required to get all parameters to pass through #require and #permit so that we can guarantee that parameter values are scalar. Currently strong_parameters, in most cases, is only being utilized to require parameters and to whitelist the few places that do mass-assignments.
2013-06-06 00:30:59 -07:00
41528f5d11 Implemented strong_parameters for Upload/UploadsController.
The topic_id param is now required using strong_parameters' #require method. If the parameter is missing ActionController::ParameterMissing will be raised instead of Discourse::InvalidParameters.
2013-06-05 00:55:55 -07:00
e3e55d4dad fix image uploads on s3/imgur 2013-06-05 00:35:42 +02:00
6cc0f8f2d4 added more file uploads test for better coverage 2013-05-31 03:13:37 +02:00
Sam
ca2dee52db moved comments to the bottom, they are way less intrusive there 2013-05-24 12:48:32 +10:00
Sam
2cd95bc649 lets try out annotations 2013-05-24 12:35:14 +10:00
dca2fbcefc add meaningful error message on upload [fixes #773] 2013-04-27 20:26:17 +02:00
42fdbe2fb6 Fixing Amazon uploads to not be hardcoded to https
Amazon S3 uploads are currently hardcoded to use https, where they should probably use whatever protocol the rest of the site is using. Removing the protocol and just using "//" links should accomplish that.
2013-04-19 22:05:51 -03:00
1692350336 added some tests for uploads 2013-04-07 17:52:46 +02:00
0481fbae8c Fix for reply to user avatar and picture uploading not working when editing post with discourse running in a prefix 2013-04-05 12:46:14 +02:00
0aff5042e5 FIX: S3 image upload 2013-03-30 17:56:25 +01:00
6e5399d544 minor cleanup, using AR querying DSL over raw SQL in some places 2013-02-28 21:54:12 +03:00
68f32af240 User hashed name for local uploads instead of 'blob' 2013-02-14 12:08:37 -05:00
61654ab8f0 Fix all the trailing whitespace 2013-02-07 16:45:24 +01:00
21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00