From nate@bx.psu.edu Wed Jun 29 13:06:27 2011 From: Nate Coraor To: galaxy-dev@lists.galaxyproject.org Subject: Re: [galaxy-dev] Regarding saving the file Date: Wed, 29 Jun 2011 13:05:51 -0400 Message-ID: <20110629170551.GV2353@bx.psu.edu> In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0045217869816649143==" --===============0045217869816649143== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable shashi shekhar wrote: > Hi All, >=20 > dataset_id=3Ddataset_id, to_ext=3Ddata.ext )}" title=3D"Save" class=3D"icon= -button > disk tooltip"> >=20 > Can u tell me how it works?.when u click on save button, it will save a file > as output file name appended with extension example > Galaxy122-[fasta-compute-sequence-length].fasta . i want to remove the first > word "Galaxy". how it's possible ? Hi Shashi, The filename is set on line 373 of galaxy-dist/lib/galaxy/web/controllers/dataset.py: 367 else: 368 trans.response.headers['Content-Length'] =3D int( os.stat= ( data.file_name ).st_size ) 369 if not to_ext: 370 to_ext =3D data.extension 371 valid_chars =3D '.,^_-()[]0123456789abcdefghijklmnopqrstu= vwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' 372 fname =3D ''.join(c in valid_chars and c or '_' for c in = data.name)[0:150] 373 trans.response.headers["Content-Disposition"] =3D "attach= ment; filename=3DGalaxy%s-[%s].%s" % (data.hid, fname, to_ext) 374 return open( data.file_name ) --nate >=20 >=20 > Regards > shashi shekhar > ___________________________________________________________ > Please keep all replies on the list by using "reply all" > in your mail client. To manage your subscriptions to this > and other Galaxy lists, please use the interface at: >=20 > http://lists.bx.psu.edu/ --===============0045217869816649143==--