Skip to content

Commit ef2c4c9

Browse files
fix: edit messages for "data create file"
1 parent a5d2098 commit ef2c4c9

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

messages/data.create.file.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,40 @@
11
# summary
22

3-
Upload a local file to an org
3+
Upload a local file to an org.
44

55
# description
66

7-
Optionally, attach the file to an existing record and give it a new name.
7+
This command always creates a new file in the org; you can't update an existing file. After a successful upload, the command displays the ID of the new ContentDocument record which represents the uploaded file.
8+
9+
By default, the uploaded file isn't attached to a record; in the Salesforce UI the file shows up in the Files tab. You can optionally attach the file to an existing record, such as an account, as long as you know its record ID.
10+
11+
You can also give the file a new name after it's been uploaded; by default its name in the org is the same as the local file name.
812

913
# flags.name.summary
1014

11-
Name given to the created file.
15+
New name given to the file after it's uploaded.
1216

1317
# examples
1418

15-
- upload a local file to the default org
16-
<%= config.bin %> <%= command.id %> --file path/to/astro.png
19+
- Upload the local file "resources/astro.png" to your default org:
20+
21+
<%= config.bin %> <%= command.id %> --file resources/astro.png
22+
23+
- Give the file a different filename after it's uploaded to the org with alias "my-scratch":
24+
25+
<%= config.bin %> <%= command.id %> --file resources/astro.png --name AstroOnABoat.png --target-org my-scratch
1726

18-
- give the file a different filename in the org
19-
<%= config.bin %> <%= command.id %> --file path/to/astro.png --name AstroOnABoat.png
27+
- Attach the file to a record in the org:
2028

21-
- attach the file to a record in the org
22-
<%= config.bin %> <%= command.id %> --file path/to/astro.png --parentid a03O900000LoJWPIA3
29+
<%= config.bin %> <%= command.id %> --file path/to/astro.png --parent-id a03fakeLoJWPIA3
2330

2431
# flags.file.summary
2532

2633
Path of file to upload.
2734

2835
# flags.parent-id.summary
2936

30-
Id of the record to attach the file to.
37+
ID of the record to attach the file to.
3138

3239
# createSuccess
3340

@@ -39,7 +46,7 @@ File attached to record with ID %s.
3946

4047
# attachFailure
4148

42-
The file was uploaded but not able to attach to the record.
49+
The file was successfully uploaded, but we weren't able to attach it to the record.
4350

4451
# insufficientAccessActions
4552

0 commit comments

Comments
 (0)