X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fmodules%2Fimage%2Fserv_image.c;fp=citadel%2Fmodules%2Fimage%2Fserv_image.c;h=9664b08732fa73fd735e7f6d08e6b46756ea412b;hb=e3f6ab99716cc32ae913a92b5ed4b351eff65a41;hp=2c7647f3fdca996b7b7c0628b615aeaf7362e246;hpb=7b3fab89fd3bf8487596ec6d3ca2194ceb0fed28;p=citadel.git diff --git a/citadel/modules/image/serv_image.c b/citadel/modules/image/serv_image.c index 2c7647f3f..9664b0873 100644 --- a/citadel/modules/image/serv_image.c +++ b/citadel/modules/image/serv_image.c @@ -98,7 +98,6 @@ void cmd_ului(char *cmdbuf) } // Check to make sure the user exists - // FIXME do this struct ctdluser usbuf; if (CtdlGetUser(&usbuf, username) != 0) { // check for existing user, don't lock it yet cprintf("%d %s not found.\n", ERROR + NO_SUCH_USER , username); @@ -141,8 +140,7 @@ void import_one_userpic_file(char *username, long usernum, char *path) fread(unencoded_data, data_length, 1, fp); char *encoded_data = malloc((data_length * 2) + 100); if (encoded_data) { - // FIXME try to guess the content-type based on the filename, don't assume GIF - sprintf(encoded_data, "Content-type: image/gif\nContent-transfer-encoding: base64\n\n"); + sprintf(encoded_data, "Content-type: %s\nContent-transfer-encoding: base64\n\n", GuessMimeByFilename(path, strlen(path))); CtdlEncodeBase64(&encoded_data[strlen(encoded_data)], unencoded_data, data_length, 1); char userconfigroomname[ROOMNAMELEN];