file:upload

Uploads files from your project to your account.

Syntax

            suitecloud file:upload [--paths "/SuiteScripts/File.js"] 

          

Options

Option

Required / Optional

Description

-i or --interactive

Optional

Runs the command in interactive mode.

--paths

Optional

Specifies the File Cabinet paths of the files you want to upload.

To upload multiple files, add a space between each path and wrap the whole argument in double quotes. For example: "/SuiteScripts/File.js" "/SuiteScripts/NewFile.js".

-h or --help

Optional

Prints the help for this command.

Interactive Example

Here's a command that uploads files from your current project to your account using the interactive mode:

            suitecloud file:upload -i 

          

Before you run the command, you'll be prompted with these questions for a SuiteApp:

            Select the folder from where you want to upload files to the File Cabinet: > \SuiteScripts \Templates (Restriced Folder) \Templates\E-mail Templates (No Files) \Templates\Marketing Templates (No Files) \Web Site Hosting Files (No Files)
Select the files you want to upload to the File Cabinet: (*) /SuiteScripts/myFile.js ( ) /SuiteScripts/myOtherFile.js (*) /SuiteScripts/SuiteScriptFile.js
The selected files will be overwritten in the File Cabinet. Do you want to continue? > Yes No 

          

Non-interactive Example

Here's a command that uploads two files, myFile.js and SuiteScriptFile.js, into a project using the non-interactive mode:

            suitecloud file:upload --paths "/SuiteScripts/myFile.js" "/SuiteScripts/SuiteScriptFile.js" 

          

Output Example

When you run the command, it produces an output that is similar to the following:

            The following files were uploaded:
/SuiteScripts/myFile.js
/SuiteScripts/SuiteScriptFile.js 

          

Related Topics

General Notices