Download Assets

26 November 2016

  • Release 9.145 - Removed MP3 download format due to incompatibilities with the mono platform.

6 October 2016

  • Release 9.133 - The command now can take a path instead of a name.

22 September 2016

  • Relese 9.127 - added the capability to download sounds in either mp3 or wav format.

10 July 2016

  • Relese 9.104 - added extended formats for the Windows platform.

23 May 2015

  • Release 8.13 - added the optional path parameter.

4 May 2014

  • Release 7.82 - added the optional format parameter for the Texture asset-type that will allow downloading to a different format other than JPEG2000.

14 December 2014

  • Release 7.28 - added.
download (Commands)
TypeCorrade progressive command
Commanddownload
DescriptionThe download command can be used to download assets from the grid.
Permissionsinteract, inventory, system (if path is specified)
Parametersgroup, password, item, type
Last ChangesRelease 9.133 - The command now can take a path instead of a name.

The download command can be used to download assets from the grid.

Command Required Parameters Required Corrade Permissions Example
download group, password, item, type interact, inventory, system (if path is specified)
llInstantMessage(CORRADE,
    wasKeyValueEncode(
        [
            // Download a texture by UUID
            "command", "download",
            "group", wasURLEscape(GROUP),
            "password", wasURLEscape(PASSWORD),
            // or the path to an item in Corrade's inventory
            "item", "742c887b-a8ed-ba7b-6e7f-8ba8e9d1d76a",
            "type", "Texture",
            "callback", wasURLEscape(URL)
        ]
    )
);
Parameter Possible Value Optional Parameter Possible Value Description Download from
type Texture format One of the supported formats. Downloads a texture in the specified format or in JPEG2000 format in case format was not specified. Asset server
Sound format One of the supported formats. Downloads a sound in OGG Vorbis format by default or in one of the supported formats. Asset server
Animation Downloads an animation in .animatn format. Asset server
Clothing Downloads wearables. Asset server
Bodypart Downloads body parts. Asset server
Landmark Downloads landmarks. Asset server
Gesture Downloads gestures. Asset server
Notecard Downloads notecards. Inventory
LSLText Downloads scripts. Inventory

and the data retrieved is compatible with the data supplied to the upload command.

Optional Parameter Possible Value Description
path A path-name ending in a file name (e.g.: C:\\Data\\Assets\\MyAsset.txt, or /mnt/data/Store.png) If a path is specified, then the asset will be saved to the file name indicated by the path.

In case the path optional parameter is not specified, then the asset will be downloaded, encoded as a Base64 string, then URI escaped and then placed as the value to the data key from the callback. If the path parameter is specified, then the data will be saved to the indicated path.

Supported Texture Image Formats

Grid clients such as Corrade download and upload textures to the grid in the JPEG2000 image format. The upload of textures in different formats other than JPEG2000 is provided as a convenience but Linden grids can only accept JPEG2000 images. In other words, regardless of the image format that you want to upload, Corrade will have to convert the image to the JPEG2000 format (with lossless compression) and only then upload it. You may want to rethink your application in case you really depend on some format provided here and convert your images to JPEG2000 yourself before uploading. For instance, under Windows, uploading a 24-bit PNG is meaningless from Corrade's perspective because the grid does not accept such a format (only JPEG2000) such that the 24-bit PNG will be first converted to JPEG2000 and then uploaded.

A counter-example when using any other format other than JPEG2000 is useful is when would you need to upload or download an image from PHP (or other environemnts) that do not have built-in support for the JPEG2000 image format. In such cases, in order to not over-complicate your script, you can use the formats listed here depending on your platform. However, as mentioned previously, be weary because grid clients can only upload textures in the JPEG2000 format such that you could probably convert your image to JPEG2000 better than having Corrade do it for you.

Platform Formats
Windows ThreeFr, A, Aai, Ai, Art, Arw, Avi, Avs, B, Bgr, Bgra, Bgro, Bmp, Bmp2, Bmp3, Brf, C, Cal, Cals, Canvas, Caption, Cin, Cip, Clip, Clipboard, Cmyk, Cmyka, Cr2, Crw, Cur, Cut, Dcm, Dcr, Dcx, Dds, Dfont, Dib, Dng, Dpx, Dxt1, Dxt5, Emf, Epdf, Epi, Eps, Eps2, Eps3, Epsf, Epsi, Ept, Ept2, Ept3, Erf, Exr, Fax, File, Fits, Flif, Fractal, Ftp, Fts, G, G3, G4, Gif, Gif87, Gradient, Gray, Group4, Hald, Hdr, Histogram, Hrz, Htm, Html, Http, Https, Icb, Ico, Icon, Iiq, Info, Inline, Ipl, Isobrl, Isobrl6, J2c, J2k, Jng, Jnx, Jp2, Jpc, Jpe, Jpeg, Jpg, Jpm, Jps, Jpt, Json, K, K25, Kdc, Label, M, M2v, M4v, Mac, Map, Mask, Mat, Matte, Mef, Miff, Mkv, Mng, Mono, Mov, Mp4, Mpc, Mpeg, Mpg, Mrw, Msl, Msvg, Mtv, Mvg, Nef, Nrw, Null, O, Orf, Otb, Otf, Pal, Palm, Pam, Pango, Pattern, Pbm, Pcd, Pcds, Pcl, Pct, Pcx, Pdb, Pdf, Pdfa, Pef, Pes, Pfa, Pfb, Pfm, Pgm, Picon, Pict, Pix, Pjpeg, Plasma, Png, Png00, Png24, Png32, Png48, Png64, Png8, Pnm, Ppm, Ps, Ps2, Ps3, Psb, Psd, Ptif, Pwp, R, RadialGradient, Raf, Ras, Raw, Rgb, Rgba, Rgbo, Rgf, Rla, Rle, Rmf, Rw2, Scr, Screenshot, Sct, Sfw, Sgi, Shtml, Six, Sixel, SparseColor, Sr2, Srf, Stegano, Sun, Svg, Svgz, Text, Tga, Thumbnail, Tif, Tiff, Tiff64, Tile, Tim, Ttc, Ttf, Txt, Ubrl, Ubrl6, Uil, Uyvy, Vda, Vicar, Vid, Viff, Vips, Vst, WebP, Wbmp, Wmf, Wmv, Wpg, X3f, Xbm, Xc, Xcf, Xpm, Xps, Xv, Y, Ycbcr, Ycbcra, Yuv
Mono Bmp, Emf, Exif, Gif, Icon, Jpeg, Png, Tiff, Wmf

Supported Sound Formats

By default sounds are stored on the grid in OGG-Vorbis format. Corrade can be told to download the sound in a different format by providing the format parameter set to one of the supported formats.

Parameter Value Description
format wav Downloads the requested sound as a WAV file.

Notes on Formats

Textures, sounds and animations are well-known formats that, once received, can be easily reused and converted to something else. On the other hand, clothing, landmarks, gestures, notecards and scripts (LSLText) are Linden-based formats that cannot be converted directly.

Some of these formats, for example Clothing, include references to images which will have to be pulled separately by first retrieving the clothing, going through the file and gathering UUIDs and then issuing another download to fetch the textures.

Notes on Permissions

Except for notecards and scripts (LSLText) all the other assets can be grabbed by Corrade's download command in case the UUID of the item is known.


secondlife/scripted_agents/corrade/api/progressive/commands/download.txt ยท Last modified: 2017/02/22 18:27 (external edit)

Access website using Tor


For the copyright, license, warranty and privacy terms for the usage of this website please see the license and privacy pages.