Skip to content

Commit

Permalink
don't use a new configuration variable for temp dir, just get the temp
Browse files Browse the repository at this point in the history
directory from the OS
  • Loading branch information
dgrant committed Mar 26, 2014
1 parent 80b348c commit 76462d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion etc/eyefiserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ geotag_accuracy:140000
# /home/myblog/pictures/%%Y-%%m-%%d
# notice the double percent sign to escape % from ini interpolation

temp_dir:/tmp
upload_dir:/home/david/Pictures/eye-fi/%%Y-%%m

# The UID of the user that you want to own the uploaded images
Expand Down
7 changes: 2 additions & 5 deletions usr/local/bin/eyefiserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import StringIO
import traceback
import errno
import tempfile

import hashlib
import binascii
Expand Down Expand Up @@ -644,13 +645,9 @@ def uploadPhoto(self,postData):
if geotag_enable:
geotag_accuracy = int(self.server.config.get('EyeFiServer','geotag_accuracy'))

tempDir = self.server.config.get('EyeFiServer', 'temp_dir')


imageTarPath = os.path.join(tempDir, imageTarfileName)
imageTarPath = os.path.join(tempfile.gettempdir(), imageTarfileName)
eyeFiLogger.debug("Generated path " + imageTarPath)


fileHandle = open(imageTarPath, 'wb')
eyeFiLogger.debug("Opened file " + imageTarPath + " for binary writing")

Expand Down

0 comments on commit 76462d1

Please sign in to comment.