A web-based SFTP file browser that makes managing your server files easy!
SFTP Browser is still in development, but you can play with it at sftpbrowser.cybah.me. In addition to the web interface, there's a fully-built SFTP HTTP API that's used for interfacing with the origin server.
This line was written using the text file editor built into SFTP Browser!!
- Connect to SFTP servers hosted on any platform
- Import and export server connections
- Navigate directories with ease
- Sort files by different attributes
- Show or hide hidden (dot) files
- Switch between list and tile views
- Download multiple files/directories as a single zip file
- Upload files by dragging and dropping or using the button
- Create new files and directories
- Rename and delete files
- Cut/copy/paste files between directories
- Use "Move to" and "Copy to" dialogs for more contextual organization
- Edit file permissions
- Recursively search for files by name within a directory
- View images, videos, and audio files in the browser
- File size limitations apply (see here - subject to change)
- Edit text files in the browser and save directly to the server
- Syntax highlighting is supported for certain languages
- Edit Markdown files and see a live preview
- Full mobile support with a responsive UI
All API endpoints require a set of request headers for connecting to the target server:
sftp-host
: The hostname of the serversftp-port
: The port of the serversftp-username
: The username to log intosftp-password
: The password, if using password authenticationsftp-key
: The private key, if using public key authentication
All API responses are in JSON format and include a boolean success
property. This is true
if no errors were encountered, or false
otherwise. If an error was encountered, a string error
property is included, which contains an error description.
Successful response example:
{
"success": true,
"...": "..."
}
Failed response example:
{
"success": false,
"error": "[error description]",
"...": "..."
}
Failed responses will always use a 400 or 500 level HTTP status code.
Endpoint: GET /api/sftp/directories/list
- Required string
path
: The target directory path - Optional boolean
dirsOnly
: Iftrue
, only directories will be returned
- string
path
: The normalized path - object[]
list
: An array of file objects- string
list[].name
: The name of this file - number
list[].accessTime
: A timestamp representing the last access time of this file - number
list[].modifyTime
: A timestamp representing the last modification time of this file - number
list[].size
: The size, in bytes, of this file - string
list[].type
: A 1-character string representing the type of this file - number
list[].group
: The ID of the group this file belongs to - number
list[].owner
: The ID of the user this file belongs to - object
list[].rights
: Permissions for this file- string
list[].rights.user
: Contains some arrangement ofr
,w
, andx
, representing the permissions the owner has for this file. - string
list[].rights.group
: Contains some arrangement ofr
,w
, andx
, representing the permissions the group has for this file. - string
list[].rights.other
: Contains some arrangement ofr
,w
, andx
, representing the permissions everyone else has for this file.
- string
- string
list[].longname
: The raw SFTP output representing this file
- string
Endpoint: POST /api/sftp/directories/create
- Required string
path
: The new directory path
- string
path
: The normalized path
Endpoint: DELETE /api/sftp/directories/delete
- Required string
path
: The path of the directory to delete
- string
path
: The normalized path
Endpoint: GET /api/sftp/files/exists
- Required string
path
: The path to check
- string
path
: The normalized path - boolean
exists
:true
if the path exists,false
otherwise - string|boolean
type
: If the file exists, this is its type character. If it doesn't exist, this isfalse
.
Endpoint: GET /api/sftp/files/stat
- Required string
path
: The path to stat
- string
path
: The normalized path - object
stats
: The stats for the file- number
accessTime
: The time the file was last accessed - number
modifyTime
: The time the file was last modified - number
size
: The size of the file - number
uid
: The ID of the file's owner - number
gid
: The ID of the file's group - number
mode
: An integer representing the file's type and permissions - boolean
isBlockDevice
:true
if the file is a block device,false
otherwise - boolean
isCharacterDevice
:true
if the file is a character,false
otherwise - boolean
isDirectory
:true
if the file is a directory,false
otherwise - boolean
isFIFO
:true
if the file is a first-in first-out file,false
otherwise - boolean
isSocket
:true
if the file is a socket,false
otherwise - boolean
isSymbolicLink
:true
if the file is a symlink,false
otherwise
- number
Endpoint: GET /api/sftp/files/get/single
- Required string
path
: The path of the file
The raw file data
An error response in JSON
Gets a temporary URL to download a single file without the need for connection headers. These URLs last 24 hours or until the server is restarted.
Endpoint: GET /api/sftp/files/get/single/url
- Required string
path
: The path of the file
- string
path
: The normalized path - string
download_url
: The resulting download URL
Gets a temporary URL for downloading a set of files and directories as a zip archive without the need for connection headers.
Endpoint: GET /api/sftp/files/get/multi
- Required string[]
paths
: A JSON-formatted array of file or directory paths
- string
path
: The normalized path - string
download_url
: The resulting download URL
Endpoint: POST /api/sftp/files/create
- Required string
path
: The path of the new file
The raw data to insert into the new file
- string
path
: The normalized path
Endpoint: PUT /api/sftp/files/append
- Required string
path
: The path of the file
The raw data to append to the file
- string
path
: The normalized path
Endpoint: PUT /api/sftp/files/move
- Required string
pathOld
: The current path - Required string
pathNew
: The new path
- string
pathOld
: The normalized old path - string
pathNew
: The normalized new path
Directories not supported.
Endpoint: PUT /api/sftp/files/copy
- Required string
pathSrc
: The source path - Required string
pathDest
: The destination path
- string
pathSrc
: The normalized source path - string
pathDest
: The normalized destination path
Directories are supported, but with no recursion.
Endpoint: PUT /api/sftp/files/chmod
- Required string
path
: The path of the file - Required string
mode
: The new mode to apply, in the form ofxyz
, wherex
,y
, andz
are integers from 0 to 7
- string
path
: The normalized path - string
mode
: The mode that was supplied
Endpoint: DELETE /api/sftp/files/delete
- Required string
path
: The path of the file
- string
path
: The normalized path