Revision 555e8e59 gss/src/gr/ebs/gss/client/FileUploadDialog.java
b/gss/src/gr/ebs/gss/client/FileUploadDialog.java | ||
---|---|---|
183 | 183 |
FileResource selectedFile = getFileForName(fileNameToUse); |
184 | 184 |
if (selectedFile == null ) { |
185 | 185 |
//we are going to create a file |
186 |
apath = folder.getPath();
|
|
186 |
apath = folder.getUri();
|
|
187 | 187 |
if (!apath.endsWith("/")) |
188 | 188 |
apath = apath + "/"; |
189 | 189 |
apath = apath + URL.encodeComponent(fileNameToUse); |
190 | 190 |
} else |
191 |
apath = selectedFile.getPath();
|
|
191 |
apath = selectedFile.getUri();
|
|
192 | 192 |
form.setAction(apath); |
193 | 193 |
String dateString = AbstractRestCommand.getDate(); |
194 | 194 |
String resource = apath.substring(GSS.GSS_REST_PATH.length() - 1, apath.length()); |
195 | 195 |
String sig = AbstractRestCommand.calculateSig("POST", dateString, resource, AbstractRestCommand.base64decode(GSS.get().getToken())); |
196 | 196 |
date.setValue(dateString); |
197 | 197 |
auth.setValue(GSS.get().getCurrentUserResource().getUsername() + " " + sig); |
198 |
GWT.log("FolderPATH:" + folder.getPath(), null);
|
|
198 |
GWT.log("FolderPATH:" + folder.getUri(), null);
|
|
199 | 199 |
submit.setEnabled(false); |
200 | 200 |
upload.setVisible(false); |
201 | 201 |
filenameLabel.setText(fileNameToUse); |
... | ... | |
396 | 396 |
* @see gr.ebs.gss.client.Updateable#update() |
397 | 397 |
*/ |
398 | 398 |
public void update() { |
399 |
String apath = folder.getPath();
|
|
399 |
String apath = folder.getUri();
|
|
400 | 400 |
if (!apath.endsWith("/")) |
401 | 401 |
apath = apath + "/"; |
402 | 402 |
apath = apath + URL.encodeComponent(fileNameToUse) + "?progress=" + fileNameToUse; |
... | ... | |
445 | 445 |
private void updateTrashedFile(String newName, FileResource trashedFile) { |
446 | 446 |
JSONObject json = new JSONObject(); |
447 | 447 |
json.put("name", new JSONString(newName)); |
448 |
ExecutePost cf = new ExecutePost(trashedFile.getPath() + "?update=", json.toString(), 200) {
|
|
448 |
ExecutePost cf = new ExecutePost(trashedFile.getUri() + "?update=", json.toString(), 200) {
|
|
449 | 449 |
|
450 | 450 |
@Override |
451 | 451 |
public void onComplete() { |
Also available in: Unified diff