SERVER EXPORTS

GalleryMedia Structure
{
  "id": 123,
  "type": "image",
  "url": "[https://example.com/image.jpg](https://example.com/image.jpg)",
  "thumbnail": "[https://example.com/thumb.jpg](https://example.com/thumb.jpg)",
  "favorite": false,
  "albumId": null,
  "createdAt": 1678900000
}

Save Media (By Source)

Saves a photo or video to the player's gallery using their Server ID (Source).

local result = exports["17mov_Phone"]:Gallery_SaveMediaBySrc(src, type, url)

Returns:

  • table: { success: boolean, data: GalleryMedia }

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

type

photo | video

โŒ

Type of media

url

string

โŒ

Direct URL to the image or video file.

Save Media (By Number)

Saves a photo or video to the player's gallery using their phone number.

local result = exports["17mov_Phone"]:Gallery_SaveMediaByNumber(number, type, url)

Returns:

  • table: { success: boolean, data: GalleryMedia }

Argument
Type
Optional
Explanation

number

number

โŒ

The player's phone number.

type

photo | video

โŒ

Type of media

url

string

โŒ

Direct URL to the image or video file.

Delete Media (By Source)

Deletes specific media from the player's gallery using their Server ID (Source).

local success = exports["17mov_Phone"]:Gallery_DeleteMediaBySrc(src, mediaId)

Returns:

  • boolean: true if deletion was successful.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's server ID (source).

mediaId

number | number[]

โŒ

The id of media

Delete Media (By Number)

Deletes specific media from the player's gallery using their phone number.

local success = exports["17mov_Phone"]:Gallery_DeleteMediaByNumber(src, mediaId)

Returns:

  • boolean: true if deletion was successful.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's phone number.

mediaId

number | number[]

โŒ

The id of media

Fetch All Media (By Source)

Retrieves all media items from a player's gallery using their Server ID (Source).

local mediaList = exports["17mov_Phone"]:Gallery_FetchAllMediaBySrc(src)

Returns:

  • GalleryMedia[]: An array of media objects.

Argument
Type

src

number

โŒ

The player's server ID (source).

Fetch All Media (By Number)

Retrieves all media items from a player's gallery using their phone number.

local mediaList = exports["17mov_Phone"]:Gallery_FetchAllMediaByNumber(number)

Returns:

  • GalleryMedia[]: An array of media objects.

Argument
Type
Optional
Explanation

src

number

โŒ

The player's phone number.

Last updated