Skip to content

Commit

Permalink
Fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
sawasawasawa committed Sep 10, 2017
1 parent 6ae4626 commit 281aecd
Show file tree
Hide file tree
Showing 9 changed files with 3 additions and 3 deletions.
Binary file added .mp3/tmp/1. Whatever ft. Jeru The Damaja.mp3
Binary file not shown.
Binary file added .mp3/tmp/3_find_a_way.mp3
Binary file not shown.
Binary file added .mp3/tmp/5_kawa-ek_o_-yciu.mp3
Binary file not shown.
Binary file not shown.
Binary file added .mp3/tmp/7. Rozmowa.mp3
Binary file not shown.
Binary file added .mp3/tmp/9. Improvisation I.mp3
Binary file not shown.
Binary file added .mp3/tmp/programuj.mp3
Binary file not shown.
4 changes: 2 additions & 2 deletions imports/startup/server/fileRoutes.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Picker} from 'meteor/meteorhacks:picker'
const fs = require('fs')

Picker.route('/images/tmp/:filename', function (params, request, response, next) {
Picker.route('/mp3/tmp/:filename', function (params, request, response, next) {
const filename = params.filename
// TODO this seems wrong
var filePath = `${process.env.PWD}/${filename}`
var filePath = `${process.env.PWD}/.mp3/tmp/${filename}`
try {
var data = fs.readFileSync(filePath)
response.setHeader('Content-Type', 'image')
Expand Down
2 changes: 1 addition & 1 deletion imports/ui/components/dialogs/Mp3Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const Mp3Dialog = (props) => {
autoScrollBodyContent
>
<audio controls>
<source src={`/images/tmp/${props.media.filename}`} type='audio/mp3' />
<source src={`/mp3/tmp/${props.media.filename}`} type='audio/mp3' />
Your browser does not support the audio element.
</audio>

Expand Down

0 comments on commit 281aecd

Please sign in to comment.