I got item a, which is an javascript object I think?
const item = myItem.getAsFile();
which returns something like
lastModified: 1521979332955
name: "image.png"
size: 15254
type: "image/png"
webkitRelativePath: ""
Next I create a object url:
const preview = window.URL.createObjectURL(item);
which returns "blob:https://localhost:3000/..."
Now I want to "push" preview: "blob:https://localhost:3000/..." inside my const item, so that next to lastModified, name, size, etc. preview: will be listed.
How can I do this?
item.preview = previewwill work.consttovarorletso you can change item. Then useitem.preview = previewto add the attribute to the object.constdoes not prevent the modification ofitem. It just disables storing another value initem.