staticresource Commands
force:staticresource:create
Help for force:staticresource:create
If not supplied, the apiversion, template, and outputdir use default values.
The outputdir can be an absolute path or relative to the current working directory.
Examples:
1sfdx force:staticresource:create -n MyResource1sfdx force:staticresource:create -n MyResource --contenttype application/json1sfdx force:staticresource:create -n MyResource -d staticresourcesCommand Syntax
- sfdx force:staticresource:create
- [--json]
- [--loglevel LOGLEVEL]
- -n RESOURCENAME
- [--contenttype CONTENTTYPE]
- [-d OUTPUTDIR]
- [--apiversion APIVERSION]
Parameters
- --json
- Optional
-
Format output as JSON.
- Type: boolean
- --loglevel LOGLEVEL
- Optional
-
The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.
- Type: enum
- Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
- Default value: warn
- -n | --resourcename RESOURCENAME
- Required
-
The name of the new static resource. This name can contain only underscores and alphanumeric characters, and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores.
- Type: string
- --contenttype CONTENTTYPE
- Optional
-
The content type of the generated static resource. This must be a valid MIME type such as application/json, application/javascript, application/zip, text/plain, text/css, etc.
- Type: string
- Default value: application/zip
- -d | --outputdir OUTPUTDIR
- Optional
-
The directory to store the newly created files. The location can be an absolute path or relative to the current working directory. The default is the current directory.
- Type: string
- Default value: .
- --apiversion APIVERSION
- Optional
-
Override the API version used for API requests made by this command.
- Type: string