You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: source/api/assets.md
+3-2
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,16 @@ order: 18
4
4
description: Documentation of how to use assets in Meteor.
5
5
---
6
6
7
+
> Currently, it is not possible to import `Assets` as an ES6 module. Any of the `Assets` methods below can simply be called directly in any Meteor server code.
8
+
7
9
`Assets` allows server code in a Meteor application to access static server
8
10
assets, which are located in the `private` subdirectory of an application's
9
11
tree. Assets are not processed as source files and are copied directly
10
12
into your application's bundle.
11
13
12
14
{% apibox "Assets.getText" %}
13
15
{% apibox "Assets.getBinary" %}
14
-
<!-- commented out because this does not exist in master -->
15
-
<!-- { % apibox "Assets.absoluteFilePath" %} -->
16
+
{% apibox "Assets.absoluteFilePath" %}
16
17
17
18
Static server assets are included by placing them in the application's `private`
18
19
subdirectory. For example, if an application's `private` subdirectory includes a
Copy file name to clipboardExpand all lines: source/api/passwords.md
+8-13
Original file line number
Diff line number
Diff line change
@@ -30,18 +30,9 @@ On the client, this function logs in as the newly created user on
30
30
successful completion. On the server, it returns the newly created user
31
31
id.
32
32
33
-
On the client, you must pass `password` and at least one of `username` or
34
-
`email`— enough information for the user to be able to log in again
35
-
later. If there are existing users with a username or email only differing in
36
-
case, `createUser` will fail. On the server, you do not need to specify
37
-
`password`, but the user will not be able to log in until it has a password (eg,
38
-
set with [`Accounts.setPassword`](#accounts_setpassword)).
39
-
40
-
To create an account without a password on the server and still let the
41
-
user pick their own password, call `createUser` with the `email` option
42
-
and then
43
-
call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This
44
-
will send the user an email with a link to set their initial password.
33
+
On the client, you must pass `password` and at least one of `username` or `email`— enough information for the user to be able to log in again later. If there are existing users with a username or email only differing in case, `createUser` will fail. The callback's `error.reason` will be `'Username already exists.'` or `'Email already exists.'` In the latter case, the user can then either [login](accounts.html#Meteor-loginWithPassword) or [reset their password](#Accounts-resetPassword).
34
+
35
+
On the server, you do not need to specify `password`, but the user will not be able to log in until it has a password (eg, set with [`Accounts.setPassword`](#accounts_setpassword)). To create an account without a password on the server and still let the user pick their own password, call `createUser` with the `email` option and then call [`Accounts.sendEnrollmentEmail`](#accounts_sendenrollmentemail). This will send the user an email with a link to set their initial password.
45
36
46
37
By default the `profile` option is added directly to the new user document. To
47
38
override this behavior, use [`Accounts.onCreateUser`](#accounts_oncreateuser).
@@ -59,7 +50,7 @@ insensitive duplicates before updates.
59
50
60
51
By default, an email address is added with `{ verified: false }`. Use
61
52
[`Accounts.sendVerificationEmail`](#Accounts-sendVerificationEmail) to send an
62
-
email with a link the user can use verify their email address.
53
+
email with a link the user can use to verify their email address.
63
54
64
55
{% apibox "Accounts.removeEmail" %}
65
56
@@ -172,4 +163,8 @@ Accounts.emailTemplates.enrollAccount.text = function (user, url) {
172
163
+" To activate your account, simply click the link below:\n\n"
0 commit comments