import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Response;
+import com.google.gwt.http.client.URL;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.ui.PopupPanel;
@Override
public void onError(Throwable t) {
GWT.log("", t);
+ app.setError(t);
if (t instanceof RestException) {
app.displayError("Unable to copy file: " + ((RestException) t).getHttpStatusText());
}
}
};
copyFile.setHeader("X-Auth-Token", app.getToken());
- copyFile.setHeader("X-Move-From", file.getUri());
+ copyFile.setHeader("X-Move-From", URL.encodePathSegment(file.getUri()));
copyFile.setHeader("Content-Type", file.getContentType());
Scheduler.get().scheduleDeferred(copyFile);
}