summaryrefslogtreecommitdiff
path: root/plugins/shotwell-publishing/PiwigoPublishing.vala
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-03-22 06:40:44 +0100
commit8e1c5a834469d804d28ee8ab2cbe2da8e600a789 (patch)
treeb9771456583eaead893cfd8f02e680b58a3da970 /plugins/shotwell-publishing/PiwigoPublishing.vala
parent80a5f2d8b095e895a5424f90b2ce4684d94c1a32 (diff)
parent3253d99365813f2d2ffd05e10cbb8c11f53d746e (diff)
Merge tag 'upstream/0.26.0'
Upstream version 0.26.0
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);