Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Greg Von Kuster
Jelle, I've added support for uploading image datatypes based on your patches in change set 5833:e7214c69ed7d, but with some changes. There is a new image_util.py file in ~/lib/galaxy/datatypes/util which allows for detecting image data types without having to create a new Image() class. I've

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread James Taylor
No, data does not require a login to view if the dataset permissions are set permissively. This allows users to share direct links to datasets (which is meant to be a good feature ;). On Jul 27, 2011, at 11:45 AM, Paul Gordon wrote: On the other hand, isn't user data supposed to require a lo

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Paul Gordon
On Jul 27, 2011, at 10:26 AM, Jelle Scholtalbers wrote: Wouldn't it be better to at least validate e-mail addresses of new users on the main instance? This would probably resolve most issues related to unwanted content on the server? Not in our experience, valid email addresses are trivial

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread James Taylor
On Jul 27, 2011, at 10:26 AM, Jelle Scholtalbers wrote: Wouldn't it be better to at least validate e-mail addresses of new users on the main instance? This would probably resolve most issues related to unwanted content on the server? Not in our experience, valid email addresses are trivial

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Peter Cock
On Wed, Jul 27, 2011 at 3:26 PM, Jelle Scholtalbers wrote: > Hi Greg, > I do see the concern of uploading data through the api but I don't think > filtering on file types is the right solution. It seems to be an issue with > allowing everyone to register. Wouldn't it be better to at least validate

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Jelle Scholtalbers
Hi Greg, I do see the concern of uploading data through the api but I don't think filtering on file types is the right solution. It seems to be an issue with allowing everyone to register. Wouldn't it be better to at least validate e-mail addresses of new users on the main instance? This would pro

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Pieter Neerincx
Hi, On Jul 27, 2011, at 3:34 PM, Peter Cock wrote: > On Wed, Jul 27, 2011 at 2:28 PM, Greg Von Kuster wrote: >> Helo Jelle, >> I've taken a look at your patches and the code looks good. >> However, I'm wondering why you find it necessary to upload image files to >> Galaxy. Do tools exist that t

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Greg Von Kuster
Hi Peter, On Jul 27, 2011, at 9:34 AM, Peter Cock wrote: > On Wed, Jul 27, 2011 at 2:28 PM, Greg Von Kuster wrote: >> Helo Jelle, >> I've taken a look at your patches and the code looks good. >> However, I'm wondering why you find it necessary to upload image files to >> Galaxy. Do tools exist

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Peter Cock
On Wed, Jul 27, 2011 at 2:28 PM, Greg Von Kuster wrote: > Helo Jelle, > I've taken a look at your patches and the code looks good. > However, I'm wondering why you find it necessary to upload image files to > Galaxy.  Do tools exist that take image files as input?  If the Galaxy > community finds

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-27 Thread Greg Von Kuster
Helo Jelle, I've taken a look at your patches and the code looks good. However, I'm wondering why you find it necessary to upload image files to Galaxy. Do tools exist that take image files as input? If the Galaxy community finds this feature as a good addition to Galaxy, we can probably i

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-25 Thread Jelle Scholtalbers
Hi Greg, this was indeed causing the problem. I added some code which now allows to sniff image files. It is practically untested (it does work for me on bmp, jpg, png, tiff) - didn't try with PIL although the code is there. Attached are diffs against changeset 058a5d7a4f84 (bit outdated - can pro

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-22 Thread Greg Von Kuster
Based on the error message you gave, I assume the following code in ~/lib/galaxy/datatypes/sniff.py is presenting the problem. if check_binary( filename ): if ext not in unsniffable_binary_formats and not datatypes_registry.get_datatype_by_extension( ext ).sniff( filename ):

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-22 Thread Jelle Scholtalbers
Hi Greg, I used that link when trying to create the support. The jpg datatype was already present in the datatypes_conf.xml ( ) , so I first made it available at upload -> display_in_upload=True. As far as I understood, if galaxy doesn't have to guess what the format is, this would be sufficien

Re: [galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-22 Thread Greg Von Kuster
Hello Jelle, There are a few things you need to do to add support for a new data type. The steps are described here: http://wiki.g2.bx.psu.edu/Admin/Datatypes/Adding%20Datatypes Greg Von Kuster On Jul 22, 2011, at 8:49 AM, Jelle Scholtalbers wrote: > Hi all, > > I would like to be able to u

[galaxy-dev] Upload of images - jpg/png - "binary file contains inappropriate content"

2011-07-22 Thread Jelle Scholtalbers
Hi all, I would like to be able to upload images to my Galaxy instance - in particular jpg/png to data libraries. I can't however find out how to overcome the problem of inappropriate content in binary file. How to go about? When I create a sniffer class in the galaxy.datatypes.images.py that alw