FileSharingLib
in package
AbstractYes
FileSharingLib
Tags
Table of Contents
Methods
- cleanUp() : mixed
- clean up the database and shared files deletes expired files and none existing files
- createCheck() : string
- create check code
- createHash() : string
- create the hash code
- getDeleteLink() : string
- getDownloadLink() : string
- getTemporaryFilePaths() : array<string|int, mixed>
- isShared() : bool
- sendMail() : mixed
- send a mail to the email with the message
- initUploader() : int
- Init the uploader which is directly included in the webpage
Methods
cleanUp()
clean up the database and shared files deletes expired files and none existing files
public
static cleanUp() : mixed
Tags
createCheck()
create check code
public
static createCheck(string $hash) : string
Parameters
- $hash : string
-
the hash of the file
Tags
Return values
string —the check code
createHash()
create the hash code
public
static createHash() : string
Tags
Return values
string —the hash code
getDeleteLink()
public
static getDeleteLink(int $fileId) : string
Parameters
- $fileId : int
Tags
Return values
string —the download link
getDownloadLink()
public
static getDownloadLink(int $fileId) : string
Parameters
- $fileId : int
Tags
Return values
string —the download link
getTemporaryFilePaths()
public
static getTemporaryFilePaths(int $uploadId) : array<string|int, mixed>
Parameters
- $uploadId : int
-
the upload id of the active upload
Return values
array<string|int, mixed>isShared()
public
static isShared([int $fileId = null ][, mixed $fileSource = null ]) : bool
Parameters
- $fileId : int = null
-
file id
- $fileSource : mixed = null
Tags
Return values
bool —is shared or not
sendMail()
send a mail to the email with the message
public
static sendMail(int $uploadId, string $subject, mixed $emails[, null|string $message = null ]) : mixed
Parameters
- $uploadId : int
-
the upload id
- $subject : string
-
the subject of the mail for the recipient
- $emails : mixed
- $message : null|string = null
-
the message for the recipient
Tags
initUploader()
Init the uploader which is directly included in the webpage
protected
initUploader() : int
Return values
int —the uploader id