Commit f7e68e96 authored by Laros's avatar Laros
Browse files

Added support for uploading files in other directories.

parent d016d0f4
from __future__ import unicode_literals
from os.path import basename
import argparse
import datetime
import getpass
......@@ -8,11 +9,10 @@ import json
import socket
import sys
from jsonschema.exceptions import ValidationError
import jsonschema
import yaml
from jsonschema.exceptions import ValidationError
from . import doc_split, usage, version
from .transfer_client import TransferClient
......@@ -134,7 +134,6 @@ def _make_metadata(log_handle, file_handles, title):
"""
metadata = _minimal_metadata(title)
# TODO: basename
for file_handle in file_handles:
log_handle.write(
'Calculating checksum for file: {}.\n'.format(file_handle.name))
......@@ -144,7 +143,7 @@ def _make_metadata(log_handle, file_handles, title):
file_handle.seek(0)
metadata['files'].append({
'filename': file_handle.name,
'filename': basename(file_handle.name),
'md5': hash_sum.hexdigest()})
return metadata
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment