Fixed 403 in mix upload

This commit is contained in:
=
2012-09-20 20:54:54 +01:00
parent ff5da8cc32
commit 54d0d3042c
545 changed files with 90 additions and 6 deletions

0
LICENSE Executable file → Normal file
View File

0
README Executable file → Normal file
View File

0
_working/create Executable file → Normal file
View File

0
_working/event.sql Executable file → Normal file
View File

0
_working/label.sql Executable file → Normal file
View File

0
_working/mix.sql Executable file → Normal file
View File

0
_working/recurrence.sql Executable file → Normal file
View File

0
_working/release.sql Executable file → Normal file
View File

0
_working/release_audio.sql Executable file → Normal file
View File

0
_working/social.sql Executable file → Normal file
View File

0
_working/venue.sql Executable file → Normal file
View File

0
apache/django_live.wsgi Executable file → Normal file
View File

0
core/__init__.py Executable file → Normal file
View File

0
core/analytics/__init__.py Executable file → Normal file
View File

0
core/analytics/google.py Executable file → Normal file
View File

0
core/decorators.py Executable file → Normal file
View File

0
core/serialisers/__init__.py Executable file → Normal file
View File

0
core/serialisers/json.py Executable file → Normal file
View File

0
core/social/Facebook.py Executable file → Normal file
View File

0
core/social/_Social.py Executable file → Normal file
View File

0
core/social/__init__.py Executable file → Normal file
View File

0
core/tasks.py Executable file → Normal file
View File

0
core/tests/__init__.py Executable file → Normal file
View File

0
core/tests/mix.py Executable file → Normal file
View File

0
core/utils/__init__.py Executable file → Normal file
View File

0
core/utils/file.py Executable file → Normal file
View File

0
core/utils/html.py Executable file → Normal file
View File

0
core/utils/live.py Executable file → Normal file
View File

0
core/utils/string.py Executable file → Normal file
View File

0
core/utils/waveform.py Executable file → Normal file
View File

0
core/widgets/__init__.py Executable file → Normal file
View File

0
core/widgets/upload.py Executable file → Normal file
View File

0
dss/__init__.py Executable file → Normal file
View File

1
dss/settings.py Executable file → Normal file
View File

@@ -115,6 +115,7 @@ MIDDLEWARE_CLASSES = (
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.gzip.GZipMiddleware',
'spa.middleware.uploadify.SWFUploadMiddleware'
#'debug_toolbar.middleware.DebugToolbarMiddleware',
)

0
dss/urls.py Executable file → Normal file
View File

0
dss/wsgi.py Executable file → Normal file
View File

0
initial_data.json Executable file → Normal file
View File

0
manage.py Executable file → Normal file
View File

0
requirements.txt Executable file → Normal file
View File

0
spa/__init__.py Executable file → Normal file
View File

0
spa/admin.py Executable file → Normal file
View File

4
spa/ajax.py Executable file → Normal file
View File

@@ -39,8 +39,7 @@ class AjaxHandler(object):
url(r'^live_now_playing/$', 'spa.ajax.live_now_playing'),
url(r'^like/$', 'spa.ajax.like', name='ajax_mix_like'),
url(r'^favourite/$', 'spa.ajax.favourite', name='ajax_mix_favourite'),
url(r'^facebook_post_likes_allowed/$', 'spa.ajax.facebook_post_likes_allowed',
name='ajax_facebook_post_likes_allowed'),
url(r'^facebook_post_likes_allowed/$', 'spa.ajax.facebook_post_likes_allowed', name='ajax_facebook_post_likes_allowed'),
url(r'^upload_image/(?P<mix_id>\d+)/$', 'spa.ajax.upload_image', name='ajax_upload_image'),
url(r'^upload_release_image/(?P<release_id>\d+)/$', 'spa.ajax.upload_release_image', name='ajax_upload_release_image'),
url(r'^upload_avatar_image/$', 'spa.ajax.upload_avatar_image', name='ajax_upload_avatar_image'),
@@ -203,7 +202,6 @@ def upload_avatar_image(request):
logger.exception("Error uploading avatar")
return HttpResponse(_get_json("Failed"))
@csrf_exempt
def upload_mix_file_handler(request):
try:
if 'Filedata' in request.FILES and 'upload-hash' in request.POST:

0
spa/api/__init__.py Executable file → Normal file
View File

0
spa/api/v1/BackboneCompatibleResource.py Executable file → Normal file
View File

0
spa/api/v1/CommentResource.py Executable file → Normal file
View File

0
spa/api/v1/EventResource.py Executable file → Normal file
View File

0
spa/api/v1/MixResource.py Executable file → Normal file
View File

0
spa/api/v1/ReleaseAudioResource.py Executable file → Normal file
View File

0
spa/api/v1/ReleaseResource.py Executable file → Normal file
View File

0
spa/api/v1/UserResource.py Executable file → Normal file
View File

0
spa/api/v1/__init__.py Executable file → Normal file
View File

0
spa/audio.py Executable file → Normal file
View File

0
spa/forms.py Executable file → Normal file
View File

0
spa/management/__init__.py Executable file → Normal file
View File

0
spa/management/commands/__init__.py Executable file → Normal file
View File

0
spa/management/commands/cleanup.py Executable file → Normal file
View File

0
spa/management/commands/drop.py Executable file → Normal file
View File

0
spa/management/commands/purchaselinks.py Executable file → Normal file
View File

0
spa/management/commands/tracklists.py Executable file → Normal file
View File

0
spa/management/commands/waveforms.py Executable file → Normal file
View File

View File

@@ -0,0 +1 @@
__author__ = 'fergalm'

View File

@@ -0,0 +1,9 @@
from django.conf import settings
from django.core.urlresolvers import reverse
class SWFUploadMiddleware(object):
def process_request(self, request):
if (request.method == 'POST') and\
(request.path == reverse('ajax_upload_mix_file_handler')) and\
request.POST.has_key(settings.SESSION_COOKIE_NAME):
request.COOKIES[settings.SESSION_COOKIE_NAME] = request.POST[settings.SESSION_COOKIE_NAME]

0
spa/models/Comment.py Executable file → Normal file
View File

0
spa/models/Event.py Executable file → Normal file
View File

0
spa/models/Label.py Executable file → Normal file
View File

0
spa/models/Mix.py Executable file → Normal file
View File

0
spa/models/MixFavourite.py Executable file → Normal file
View File

0
spa/models/MixLike.py Executable file → Normal file
View File

0
spa/models/MixPlay.py Executable file → Normal file
View File

0
spa/models/PurchaseLink.py Executable file → Normal file
View File

0
spa/models/Recurrence.py Executable file → Normal file
View File

0
spa/models/Release.py Executable file → Normal file
View File

0
spa/models/Tracklist.py Executable file → Normal file
View File

0
spa/models/UserProfile.py Executable file → Normal file
View File

0
spa/models/Venue.py Executable file → Normal file
View File

0
spa/models/_Activity.py Executable file → Normal file
View File

0
spa/models/_BaseModel.py Executable file → Normal file
View File

0
spa/models/_Lookup.py Executable file → Normal file
View File

0
spa/models/__init__.py Executable file → Normal file
View File

0
spa/social.py Executable file → Normal file
View File

0
spa/templates.py Executable file → Normal file
View File

0
spa/templatetags/__init__.py Executable file → Normal file
View File

0
spa/templatetags/spa_extras.py Executable file → Normal file
View File

0
spa/urls.py Executable file → Normal file
View File

0
spa/views.py Executable file → Normal file
View File

0
static/bin/sm/soundmanager2.swf Executable file → Normal file
View File

0
static/bin/sm/soundmanager2_debug.swf Executable file → Normal file
View File

0
static/bin/sm/soundmanager2_flash9.swf Executable file → Normal file
View File

0
static/bin/sm/soundmanager2_flash9_debug.swf Executable file → Normal file
View File

0
static/bin/sm/soundmanager2_flash_xdomain.zip Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap-datepicker.css vendored Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap-responsive.css vendored Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap-responsive.min.css vendored Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap-timepicker.css vendored Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap.css vendored Executable file → Normal file
View File

0
static/css/bootstrap/bootstrap.min.css vendored Executable file → Normal file
View File

0
static/css/colorbox.css Executable file → Normal file
View File

0
static/css/com.podnoms.player.css Executable file → Normal file
View File

0
static/css/deepsouthsounds.css Executable file → Normal file
View File

0
static/css/jasny/jasny-bootstrap-responsive.css Executable file → Normal file
View File

Some files were not shown because too many files have changed in this diff Show More