Constructor
new sCFiles(app_id, app_secret)
Opens a new schmuckliCloud files instance.
Parameters:
Name | Type | Description |
---|---|---|
app_id |
String |
The APP ID, which was created for a client app in the schmuckliCloud console. |
app_secret |
String |
The APP Secret, which was created for a client app in the schmuckliCloud console. |
- Source:
Methods
setAuthToken(auth_token)
Sets the currently signed in user.
Parameters:
Name | Type | Description |
---|---|---|
auth_token |
string |
Sets the auth token for the further operations. |
- Source:
(async) upload(files) → {sCResult}
Uploads the given files with the defined auth token before and returns the result like token and location.
Parameters:
Name | Type | Description |
---|---|---|
files |
array |
Contains an array with files from a file input field. |
- Source:
(async) resetToken(filename) → {sCResult}
Resets the currently active token for the given filename with a new one.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string |
The name of the file, where the token should be reset. |
- Source:
(async) requestArchive(filenames) → {sCResult}
Creates an archive link with the provided filenames and tokens.
Parameters:
Name | Type | Description |
---|---|---|
filenames |
array |
An array, where the filenames and tokens are combined: [{name: "xyz.jpg", token: "a6f40..."}] |
- Source:
(async) delete(filename) → {sCResult}
Deletes the file with the given name.
Parameters:
Name | Type | Description |
---|---|---|
filename |
string |
The name of the file, where the token should be reset. |
- Source: