Skip to content
Snippets Groups Projects
Commit f21341e6 authored by fabiovandewaeter's avatar fabiovandewaeter
Browse files

modification renommage

parent f06bab35
Branches
Tags
No related merge requests found
......@@ -95,7 +95,7 @@ curl -X GET -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous"
curl -X GET -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous" -H "X-FTP-Pass: anonymous" http://localhost:8080/ftps/mon-ftp/fichier1 -o fichier1
```
-download dossier :
- download dossier (ne fonctionne pas bien pour le moment je crois) :
```shell
curl -X GET -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous" -H "X-FTP-Pass: anonymous" http://localhost:8080/ftps/mon-ftp/dossier1 -o dossier1.zip
......@@ -107,7 +107,7 @@ unzip dossier1.zip
curl -X PUT -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "X-FTP-Pass: password" --upload-file fichier2 http://localhost:8080/ftps/mon-ftp/fichier2
```
- upload dossier :
- upload dossier (ne fonctionne pas bien pour le moment je crois) :
```shell
curl -X PUT -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "X-FTP-Pass: password" --upload-file dossier2.zip http://localhost:8080/ftps/mon-ftp/dossier2.zip
......@@ -117,6 +117,16 @@ curl -X POST -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "
**Note comprise entre 12 et 13 si—en plus—le proxy FlopBox, permet de télécharger (download) et téléverser (upload) un gros fichier binaire (image, vidéo, etc.):**
- download fichier :
```shell
curl -X GET -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: anonymous" -H "X-FTP-Pass: anonymous" http://localhost:8080/ftps/mon-ftp/image.png -o image.png
```
- upload fichier :
```shell
curl -X PUT -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "X-FTP-Pass: password" --upload-file image2.jpg http://localhost:8080/ftps/mon-ftp/image2.jpg
```
**Note comprise entre 13 et 14 si—en plus—le proxy FlopBox permet de gérer plusieurs serveurs FTP différents (ajout, suppression, modification des serveurs):**
- ajout :
......@@ -153,7 +163,7 @@ curl -X POST -H "X-Resource-Type: file" -H "Authorization: Bearer valid-token-1"
- renommer :
```shell
curl -X POST -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "X-FTP-Pass: password" -H "Content-Type: text/plain" -d "nouveau_nom" http://localhost:8080/ftps/mon-ftp/dossier/rename
curl -X PUT -H "Authorization: Bearer valid-token-1" -H "X-FTP-User: user" -H "X-FTP-Pass: password" -H "Content-Type: text/plain" -d "nouveau_nom" http://localhost:8080/ftps/mon-ftp/dossier/rename
```
- supprimer dossier/fichier :
......
FICHIER2
dossier_serveur_ftp/image.png

45.2 KiB

......@@ -224,8 +224,7 @@ public class FTPResource {
}
}
// POST pour renommer une ressource
@POST
@PUT
@Path("/{alias}/{path: .+}/rename")
@Consumes(MediaType.TEXT_PLAIN)
public Response renameResource(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment