mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 05:45:37 +08:00
Enabling UUID in file upload
This commit is contained in:
@@ -243,6 +243,7 @@ def get_uploaded_datasets( trans, cntrller, params, precreated_datasets, dataset
|
||||
else:
|
||||
data.extension = uploaded_dataset.file_type
|
||||
data.dbkey = uploaded_dataset.dbkey
|
||||
data.uuid = uploaded_dataset.uuid
|
||||
trans.sa_session.add( data )
|
||||
trans.sa_session.flush()
|
||||
if library_bunch:
|
||||
|
||||
@@ -278,6 +278,7 @@ class UploadDataset( Group ):
|
||||
ftp_files = context['ftp_files']
|
||||
name = context.get( 'NAME', None )
|
||||
info = context.get( 'INFO', None )
|
||||
uuid = context.get( 'uuid', None )
|
||||
warnings = []
|
||||
to_posix_lines = False
|
||||
if context.get( 'to_posix_lines', None ) not in [ "None", None, False ]:
|
||||
@@ -316,12 +317,14 @@ class UploadDataset( Group ):
|
||||
break
|
||||
file_bunch.to_posix_lines = to_posix_lines
|
||||
file_bunch.space_to_tab = space_to_tab
|
||||
file_bunch.uuid = uuid
|
||||
return file_bunch, warnings
|
||||
def get_filenames( context ):
|
||||
rval = []
|
||||
data_file = context['file_data']
|
||||
url_paste = context['url_paste']
|
||||
ftp_files = context['ftp_files']
|
||||
uuid = context.get( 'uuid', None )
|
||||
name = context.get( 'NAME', None )
|
||||
info = context.get( 'INFO', None )
|
||||
to_posix_lines = False
|
||||
@@ -332,12 +335,14 @@ class UploadDataset( Group ):
|
||||
space_to_tab = True
|
||||
warnings = []
|
||||
file_bunch = get_data_file_filename( data_file, override_name = name, override_info = info )
|
||||
file_bunch.uuid = uuid
|
||||
if file_bunch.path:
|
||||
file_bunch.to_posix_lines = to_posix_lines
|
||||
file_bunch.space_to_tab = space_to_tab
|
||||
rval.append( file_bunch )
|
||||
for file_bunch in get_url_paste_urls_or_filename( context, override_name = name, override_info = info ):
|
||||
if file_bunch.path:
|
||||
file_bunch.uuid = uuid
|
||||
file_bunch.to_posix_lines = to_posix_lines
|
||||
file_bunch.space_to_tab = space_to_tab
|
||||
rval.append( file_bunch )
|
||||
|
||||
@@ -41,6 +41,7 @@
|
||||
<!-- Swap the following parameter for the select one that follows to
|
||||
enable the to_posix_lines option in the Web GUI. See Bitbucket
|
||||
Pull Request 171 for more information. -->
|
||||
<param name="uuid" type="text" required="False" />
|
||||
<param name="to_posix_lines" type="hidden" value="Yes" />
|
||||
<!--
|
||||
<param name="to_posix_lines" type="select" display="checkboxes" multiple="True" label="Convert universal line endings to Posix line endings" help="Turn this option off if you upload a gzip, bz2 or zip archive which contains a binary file." value="Yes">
|
||||
|
||||
Reference in New Issue
Block a user