[Rawstudio-commit] r3148 - trunk/plugins/output-facebook

Anders Kvist anders at kvistmail.dk
Sun Jan 31 14:07:42 CET 2010


Author: akv
Date: 2010-01-31 14:07:42 +0100 (Sun, 31 Jan 2010)
New Revision: 3148

Modified:
   trunk/plugins/output-facebook/rs-facebook-client.c
Log:
Adding filesize when uploading to facebook.

Modified: trunk/plugins/output-facebook/rs-facebook-client.c
===================================================================
--- trunk/plugins/output-facebook/rs-facebook-client.c	2010-01-31 12:46:40 UTC (rev 3147)
+++ trunk/plugins/output-facebook/rs-facebook-client.c	2010-01-31 13:07:42 UTC (rev 3148)
@@ -20,6 +20,8 @@
 #include <curl/curl.h>
 #include <libxml/encoding.h>
 #include <gtk/gtk.h>
+#include <glib.h>
+#include <glib/gstdio.h>
 #include "rs-facebook-client.h"
 
 #define HTTP_BOUNDARY "4wncn84cq4ncto874ytnv90w43htn"
@@ -382,7 +384,13 @@
 
 	RSFacebookClientParam *param = rs_facebook_client_param_new();
 
+	struct stat st;
+	g_stat(filename, &st);
+	const gchar *filesize = g_strdup_printf("%d", (gint) st.st_size);
+
 	rs_facebook_client_param_add_string(param, "filename", filename);
+	rs_facebook_client_param_add_string(param, "length", filesize);
+
 	if (caption)
 		rs_facebook_client_param_add_string(param, "caption", caption);
 	if (aid)




More information about the Rawstudio-commit mailing list