summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing/PiwigoPublishing.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/shotwell-publishing/PiwigoPublishing.vala')
-rw-r--r--plugins/shotwell-publishing/PiwigoPublishing.vala9
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/shotwell-publishing/PiwigoPublishing.vala b/plugins/shotwell-publishing/PiwigoPublishing.vala
index 60219a6..15d118b 100644
--- a/plugins/shotwell-publishing/PiwigoPublishing.vala
+++ b/plugins/shotwell-publishing/PiwigoPublishing.vala
@@ -1773,9 +1773,12 @@ private class ImagesAddTransaction : Publishing.RESTSupport.UploadTransaction {
GLib.HashTable<string, string> disposition_table =
new GLib.HashTable<string, string>(GLib.str_hash, GLib.str_equal);
- disposition_table.insert("filename", Soup.URI.encode(
- publishable.get_param_string(
- Spit.Publishing.Publishable.PARAM_STRING_BASENAME), null));
+ var basename = publishable.get_param_string(Spit.Publishing.Publishable.PARAM_STRING_BASENAME);
+ if (!basename.down().has_suffix(".jpeg") &&
+ !basename.down().has_suffix(".jpg")) {
+ basename += ".jpg";
+ }
+ disposition_table.insert("filename", Soup.URI.encode(basename, null));
disposition_table.insert("name", "image");
set_binary_disposition_table(disposition_table);