How to add file with custom domain url on wix?

Hey,

How I create file with my custom domain url on Wix? like my-domain-name/logo.png

Thank you

As far as I know you currently can’t do it on Wix.
However you can create a router that will redirect from
my-domain-name.com/media/logo.png
To the image url.
For example create a database named “Pictures”.
2 field:
path
image
An example for path value is “logo.png”
in the image field you put the image image.

The you create a router page “media”.
And you put in routers.js something like:

import {redirect, notFound} from "wix-router";
import wixData from "wix-data";
export function media_Router(req) { 
const urlPath= req.path;
if(!urlPath){return notFound();}
const target = urlPath[0];
return wixData.query("Pictures")
.eq("path", target)
.distinct("image")
.then(r => {
if(r.items.length === 0){return notFound();}
return redirect(r.items[0]);
})
}