This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

CrushFTP supports REST style operations for file transfer. All you need is an auth header with BASIC auth, or a logged in cookie token.

You can get the CrushAuth cookie token via a POST with these parameters:

command=login&username=user&password=pass&encoded=true

Alternatively just issuing the HTTP BASIC auth header with its normal BASE64 encoded syntax is also valid but can't be tracked to a single session. So its not always desirable even though its convenient.

For file transfer, you can now do a GET or PUT command to download or upload.

GET /myfiles/file1.txt
PUT /anotherfolder/file2.txt

The path is for the user's VFS as configured in the User Manager. It has nothing to do with your server's local filesystem.

A rename can be done via the MOVE HTTP command, or via a POST with more parameters:

MOVE /myfiles/file1.txt
Location: http://serverdomain.com/anotherfolder/file3.txt
Or POST:
command=rename&path=/myfiles/&name1=file1.txt&name2=/anotherfolder/file3.txt&c2f=ABCD
  • This is the same command issued via our WebInterface, so you can always inspect with Chrome for other commands on how we do it.
  • As with all POST scenarios, the c2f is required if using a CrushAuth cookie token. The c2f is the last 4 characters of the CrushAuth cookie.


Deleting can be done via DELETE HTTP command or via POST with more parameters:
DELETE /myfiles/file1.txt
Or POST:
command=delete&names=/anotherfolder/file3.txt&c2f=ABCD
  • As with all POST scenarios, the c2f is required if using a CrushAuth cookie token. The c2f is the last 4 characters of the CrushAuth cookie.


Multipart from uploading is also possible, but far more complex of a topic. You should already be familiar with how multipart works. The parameters for uploading are:
command=STOR
alt_name=file4.txt
uploadPath=/anotherfolder/
start_resume_loc=0. ***OPTIONAL
Last-Modified=milliseocndtimestamp ***OPTIONAL
c2f=ABCD
filenameobjectdata

  • As with all POST scenarios, the c2f is required if using a CrushAuth cookie token. The c2f is the last 4 characters of the CrushAuth cookie.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 25-Oct-2018 04:31 by Ben Spink.
G’day (anonymous guest)
CrushFTP9 | What's New

Referenced by
API

JSPWiki