Fetch USDZ / USD file from flask python not working on safari


I have a server running a basic Flask server with send_file to allow a USDZ file to be downloaded
when fetching the endpoint:

@app.route("/make_usd", methods=['GET'])
def make_usd():
    data = usd.create_usd(1, 2, 0.05)
    response = make_response(send_file(data["url"], mimetype="model/vnd.usdz+zip", attachment_filename=data["url"], as_attachment=True))
    response.headers['Access-Control-Allow-Origin'] = "*"
    return response

This works perfectly on Chrome, when fetching the file is downloaded ok.

On safari I get "safari unable to open page"

Thanks for helping


when fetching

Why you use If you want to access service locally hosted on the machine you work on? Then use either localhost or instead.

Answered By – Marcin Orlowski

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published