#FEATURE by cg draft
authorClaus Gittinger <cg@exept.de>
Wed, 13 Sep 2017 17:00:46 +0200
changeset 3492 f212578d1276
parent 3491 c1333ee85336
child 3493 4396fb652bd7
#FEATURE by cg class: ImageEditor changed: #doLoadFromURL
ImageEditor.st
--- a/ImageEditor.st	Wed Sep 13 10:15:45 2017 +0200
+++ b/ImageEditor.st	Wed Sep 13 17:00:46 2017 +0200
@@ -8690,7 +8690,15 @@
         LastURL := url.
         tempFile := FileStream newTemporary close fileName.
         self withWaitCursorDo:[
+            |newURL|
+            
             response := HTTPInterface get:url destinationFile:tempFile.
+            response isMovedResponse ifTrue:[
+                newURL  := response location.
+                newURL ~= url ifTrue:[
+                    response := HTTPInterface get:newURL destinationFile:tempFile.
+                ].    
+            ].    
         ].
         response isErrorResponse ifTrue:[
             Dialog warn:(resources string:'Could not load image ("%1")' with:response responseText).
@@ -8701,7 +8709,7 @@
     ]
 
     "Created: / 20-09-2010 / 11:30:59 / cg"
-    "Modified: / 16-02-2017 / 10:51:18 / cg"
+    "Modified: / 13-09-2017 / 17:00:28 / cg"
 !
 
 doNewImage