Commits

Ryan Faerman committed 5908df4

removed test upload code

  • Participants
  • Parent commits 3bb8a6f

Comments (0)

Files changed (1)

File controllers/episode.coffee

 
 				req.flash 'success', "The episode \"#{episode.title}\" is processing."
 				res.redirect '/admin'
-	
-	# test upload gridfs
-	app.get '/upload', (req, res) ->
-		res.render 'admin/upload', layout: 'bare-layout'
-
-	app.post '/upload', (req, res) ->
-
-		req.form.on 'progress', (bytesReceived, bytesExpected) ->
-			percent = (bytesReceived / bytesExpected) * 100 or 0
-			console.log "Uploading: #{percent}%"
-		
-		req.form.complete (err, fields, files) ->
-			unless err
-				file = files.audio
-				console.log file
-
-				db.open (err, db) ->
-					unless err
-						console.log file.name
-						meta = 
-							content_type: file.type
-							metadata:
-								filename: file.name
-
-						gs = new mongo.GridStore db, file.name, 'w', meta
-						gs.writeFile file.path, (err, gs2) ->
-							extension = file.name.substr(file.name.lastIndexOf('.') + 1)
-							db.close()
-							res.redirect "/grid/#{gs2._id}.#{extension}"
-
 
 	# edit
 	app.get '/admin/episode/:_id', (req, res) ->