Large file upload from other domains (CORS)

Hi! I see the ifc-fileupload is under development and things are changing rapidly. Very nice! @fabians
Sometime last or this week you guys enabled the large file import feature on the main speckle server if I am not mistaken?
Last week I only got the legacy uploader working and this week I no longer get “The large file import feature is not enabled on this server…”.
Now I wanted to switch to the new one since I am guessing there are several advantages to it? I.e. a larger maximum filesize?

I am probably jumping a bit too early on it given that it is so fresh.
During testing of the new signed upload url method I am running into CORS issues. My guess is that the bucket is configured to only allow “https://app.speckle.systems” as origin. My goal is an easy ifc file upload from our domain without having to switch to the speckle dashboard.
Now to my main question:

Is it possible to configure the CORS setting for file uploads differently?

I understand it has some security implications. If it is not possible to change this restriction it might be possible to supply a trusted origin to the “generateUploadUrl” mutation that then configures the cors? -I don’t have much s3/digitalocean experience to know if that is even remotely possible.

Let me know your thoughts, for now I can use the legacy api based method but I don’t know if you are planning to deprecate/remove it at some point.
I could also dig a bit deeper into the speckle codebase to come up with a solution proposal but I wanted to start this discussion beforehands.
Maybe I am just doing it wrong.

Thanks a lot!
Sebastian

-bump-
Any notes on this?

Hey @Witt - there’s like 5 internal whispers on this thread that you don’t see (internal chat aside) - basically team’s discussing things on how to best enable this. I think @gergo will call the final shot and will need to update you.

1 Like

Okay, update: it’s going to happen (…more internal chats, sometimes i wish we could copy paste). Team will notify you when it’s live, should be soon :slight_smile:

1 Like

Awesome, looking forward to it!

The changes to CORS policy have now been rolled out @Witt

Iain

3 Likes

I just tested it with a 190mb .ifc and everything worked.
Thanks a lot!

2 Likes