Specify base path for assets in gridjs-spreadsheet

Is there a way to specify the base path where gridjs-spreadsheet assets are served from?

I’m seeing 404 error when trying to load https://localhost:3000/workspace/content/img/updating.gif. It looks like gridjs-spreadsheet is loading a file at a path relative to the current path (https://localhost:3000/workspace/387a549f-0b0c-4769-b43d-a9b04567f857), that is, prefixing with /workspace.

It would be good to be able to tell it to look under another path, eg “/assets/static”.

you can use:
xs.setImageInfo(div, url,upload1,upload2,copyUrl, zorder,updating)
the last parameter is the updating icon.
for example if you set :‘assests/update.gif’
then it will get from https://localhost:3000/workspace/assests/update.gif
we will update this api in the document later.

We have opened the following new ticket(s) in our internal issue tracking system .
Issue Title: update client js document to include setImageInfo api
Issue Type: Document
Issue ID(s): CELLSGRIDJS-797

Thanks @peter.zhou, that did the trick!

Thank you for your feedback. If you have any questions, please feel free to contact us.

Hey @peter.zhou, @John.He, on the latest version of gridjs-spreadsheet, we’re seeing this same issue but when calling new Spreadsheet. Here’s the relevant part of the stacktrace:

loadImage (vendors~main.chunk.js:122874)
e.fabric.Image.S.Image.fromURL (vendors~main.chunk.js:129218)
e (vendors~main.chunk.js:153603)
createSpreadsheet (main.chunk.js:67785)

createSpreadsheet is our function, and it’s on the line that invokes new Spreadsheet.

Is there a way to specify the loading gif URL in the spreadsheet constructor?

we will add loadoption for loading gif