Download a file, Delete a file, Download a file delete a file – HP StoreAll Storage User Manual

Page 157

Advertising
background image

Download a file

This command transfers the contents of a file to the client from the HTTP share. Download capability
already exists in the StoreAll HTTP shares feature, and it is documented here for completeness. If
the file does not exist, a 404 Not Found HTTP error is returned, in addition to HTML output such
as the following:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head>

<title>404 Not Found</title>

</head><body>

<h1>Not Found</h1>

<p>The requested URL /api/myfile.txt was not found on this server.</p>

</body></html>

If using curl, the HTML output is saved to the specified local file as if it were the contents of the
file.

The HTTP command is sent in the form of an HTTP GET request.

HTTP syntax

The HTTP request line format is:

GET /<urlpath>/<pathname> HTTP/1.1

The equivalent curl command format is:

curl -o <local_pathname>

http[s]://<IP_address>:<port>/<urlpath>/<pathname>

See

“Using HTTP” (page 114)

for information about the IP address, port, and URL path.

Description

Parameter

The pathname of the file to be downloaded from the HTTP share and stored on the client’s
system.

local_pathname

The pathname of the existing file on the HTTP share to download to the client.

pathname

Example

curl -o temp/a1.jpg http://99.226.50.92/ibrix_share1/lab/images/xyz.jpg

This example downloads an existing file called xyz.jpg in the lab/images subdirectory of the
ibrix_share1

HTTP share. The file is created with the filename a1.jpg on the client system, in

the subdirectory temp of the user’s current directory.

If the file already exists at that path on the client, its contents are overwritten by the contents of
xyz.jpg

, provided that the local client’s permissions and retention settings on that file and directory

allow it. If the overwriting is denied, a local client system-specific error message is returned.

Delete a file

This command removes a file from the StoreAll file system by using the HTTP share interface. File
deletion is subject to StoreAll permissions on the file and directory, and it is subject to retention
settings on that file system. If file deletion is denied, an HTTP error is returned. If the file does not
exist, a 404 Not Found HTTP error is returned.

NOTE:

The delete command is only for WebDAV enabled shares.

The HTTP command is sent in the form of an HTTP DELETE request.

File content transfer

157

Advertising