View Issue Details

IDProjectCategoryView StatusLast Update
0002583gnunet-gtkgnunet-fs-gtkpublic2012-11-05 17:32
Reporterbratao Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformW32 only 
Product VersionGit master 
Target Version0.9.4 
Summary0002583: Fs_gtk specify a wrong mime type for Thumbnails
DescriptionIf we dd an Thumbnail for publishing a file on gnunet_fs_gtk, on file_information_update (gnunet-fs-gtk_publish-edit-dialog.c )is setting an PNG mime as ".png", while the GNUNET_CONTAINER_meta_data_get_thumbnail expect the mime to start with : "image/".

So no thumbnail is presented in a search.


TagsNo tags attached.

Activities

Christian Grothoff

2012-10-08 21:18

manager   ~0006425

I assume you're talking about the line 995 where it says:

mime = g_file_info_get_attribute_string (finfo, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
   

That's the only place I can see that sets the mime type as you describe. However, I tested it and it works _fine_ on my system. I selected a file for publishing, selected 'edit', changed the thumbnail to some other (PNG) file, confirmed, published, searched -- and got the preview as expected.

So if I did everything right, reproducibility is either not 'always' or platform is not 'any'. If you did this on W32, maybe your gtk version doesn't properly support PNG, or your Gtk version is one that doesn't return mime types here? Can you check what 'mime' is after the line I quoted? And please DO report your specific platform (OS, gtk version, etc.).

Christian Grothoff

2012-10-08 21:37

manager   ~0006426

(11:20:31 PM) bratao: Yep, Sorry was just on W32.
(11:20:42 PM) bratao: The content of the line is ¨.PNG¨
(11:20:48 PM) bratao: of mime
(11:23:05 PM) grothoff: Ah: http://gtk-for-symbian.googlecode.com/svn-history/r259/trunk/gio/gcontenttype.c
(11:23:16 PM) bratao: 2.24.12
(11:23:20 PM) grothoff: On GNU, it is the mime type, on W32, just '.png'. According to spec even.
(11:23:21 PM) grothoff: Yuck.
(11:24:22 PM) grothoff: * A content type is a platform specific string that defines the type
(11:24:22 PM) grothoff: * of a file. On unix it is a mime type, on win32 it is an extension string
(11:24:22 PM) grothoff: * like ".doc", ".txt" or a percieved string like "audio". Such strings
(11:24:22 PM) grothoff: * can be looked up in the registry at HKEY_CLASSES_ROOT.
(11:24:41 PM) grothoff: So not really something that is even necessarily easily mapped to a proper mime-type.
(11:24:47 PM) grothoff: I mean, "audio"!?
(11:33:48 PM) grothoff: Please check if SVN 24229 fixes it. GNU libextractor with libmagic installed required...

bratao

2012-10-10 05:39

reporter   ~0006430

Not working. https://gnunet.org/bugs/view.php?id=2584 is blocking it to work.
Maybe we can try to add libpng and gstreamer too ? Both recognize the mime.

bratao

2012-10-10 16:43

reporter   ~0006433

Working good !

Issue History

Date ModifiedUsernameFieldChange
2012-10-07 19:34brataoNew Issue
2012-10-08 21:18Christian GrothoffNote Added: 0006425
2012-10-08 21:18Christian GrothoffAssigned To => Christian Grothoff
2012-10-08 21:18Christian GrothoffStatusnew => feedback
2012-10-08 21:18Christian GrothoffPrioritynormal => low
2012-10-08 21:37Christian GrothoffNote Added: 0006426
2012-10-08 21:38Christian GrothoffPrioritylow => normal
2012-10-08 21:38Christian GrothoffPlatformANY => W32 only
2012-10-08 21:38Christian GrothoffProduct Version => Git master
2012-10-08 21:38Christian GrothoffTarget Version => 0.9.4
2012-10-10 05:39brataoNote Added: 0006430
2012-10-10 05:39brataoStatusfeedback => assigned
2012-10-10 16:43brataoNote Added: 0006433
2012-10-10 16:43brataoStatusassigned => resolved
2012-10-10 16:43brataoResolutionopen => fixed
2012-11-05 17:32Christian GrothoffStatusresolved => closed