Exemple #1
0
def upload_data(contents, filename):
    """Upload Files and Regenerate the file list."""
    if contents:
        for i in range(len(filename)):
            FileUtils.upload(filename[i], contents[i])
    files = FileUtils.files('raw')
    if len(files) == 0:
        options = [{'label': 'No files uploaded yet!', 'value': 'None'}]
        return options
    else:
        options = [{'label': file, 'value': file} for file in files]
        return options
Exemple #2
0
def upload_data(contents, filename):
    """Upload Files and Regenerate the file list."""
    if contents:
        for i in range(len(filename)):
            FileUtils.upload(filename[i], contents[i])
    return common.get_options('raw')