admin管理员组

文章数量:1359210

i have an odata service with an entity that is set as media and we're using the create_stream method. i have a pdf in base64 string that im intending to upload by this create_stream but since its created by another method im trying to add it to the collection as an item, it works, its shown in the items when i see the screen

upload collection established in the XML view

i create said pdf with an api called jspdf and use one of its method to turn the resulting file on a base 64 string

parsing of the pdf to base 64 and the giving it to the collection as part of a model

when i have the string ready i create a File with it giving the type "text/plain" and a name. after that i set said file as value for the property of a model, said model is used as a source of items for the collection.

up to this point, everything is working, except for one little detail, this item is not set as part of the content the collection have to upload.

content log when i try to see what items are pending for upload

unlike when one usually browses his device to select a file, when i try to do it programatically, the collection refuses to have whatever i passed him for item as something to upload, ive tried with uploadCllectionItem too and still doesnt work, and i cannot use the browser since this control its invisible. any ideas to make it work?? at least i have ran out of all i had.

thanks in advance.

本文标签: putting a base 64 as an item on fiori upLoadcollection version 160Stack Overflow