# Storing data to asset

**URL:** <https://talk.jelurida.com/t/storing-data-to-asset/108>\
**Category:** Developers\
**Created:** [31 December 2020 10:17 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108 "2020-12-31T10:17:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheWireMaster](https://talk.jelurida.com/user_avatar/talk.jelurida.com/thewiremaster/32/12_2.png) [@TheWireMaster](https://talk.jelurida.com/u/TheWireMaster)\
**Post date:** [31 December 2020 10:17 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108/1 "2020-12-31T10:17:59Z")

</div>

For the DeadFish parody, I've created a singleton asset with the base64 picture data stored in the description of the asset.  
As the asset description allows only 1kb, I was wondering if there's another permanent data field I could bound to an asset to store more than 1kb.  
Thx

---

<div class="post-metadata">

**Author:** ![sergi](https://talk.jelurida.com/user_avatar/talk.jelurida.com/sergi/32/21_2.png) [@sergi](https://talk.jelurida.com/u/sergi)\
**Post date:** [2 January 2021 07:50 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108/2 "2021-01-02T07:50:56Z")

</div>

You don't need it to be permanent, it can be a prunable transaction. For example, a tagged data (data cloud) transaction. You can first upload the picture and then store the full hash of the transaction on the asset description effectively linking both together.

---

<div class="post-metadata">

**Author:** ![TheWireMaster](https://talk.jelurida.com/user_avatar/talk.jelurida.com/thewiremaster/32/12_2.png) [@TheWireMaster](https://talk.jelurida.com/u/TheWireMaster)\
**Post date:** [2 January 2021 08:18 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108/3 "2021-01-02T08:18:42Z")

</div>

Hi Sergi! That's a good idea! Was just testing the other way around, which is adding to the data cloud description the asset ID of the "owner".  
But I like your way more. 🙂 or maybe both so there is a link in both ways.  
But if the transaction is prunable, that means that only the creation transaction is pruned, not the data itself, right?

---

<div class="post-metadata">

**Author:** ![sergi](https://talk.jelurida.com/user_avatar/talk.jelurida.com/sergi/32/21_2.png) [@sergi](https://talk.jelurida.com/u/sergi)\
**Post date:** [2 January 2021 08:44 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108/4 "2021-01-02T08:44:53Z")

</div>

Adding the asset id to the data cloud transaction won't work. Anyone would be able to do so. I could upload a malicious image and add the asset ID to the data cloud description.

Prunable transactions mean the data payload is removed from non-archival nodes, but the transaction itself (the metadata if you want) is kept there along with the hash of the data, the signature, etc. So all nodes could validate the block this transaction is included in.

To validate the transaction itself you could retrieve the pruned data from an archival node and verify the hash matches. You don't need to worry about that, it's automatically done (that's what the `retrieve=true` parameter on the API calls does).

---

<div class="post-metadata">

**Author:** ![TheWireMaster](https://talk.jelurida.com/user_avatar/talk.jelurida.com/thewiremaster/32/12_2.png) [@TheWireMaster](https://talk.jelurida.com/u/TheWireMaster)\
**Post date:** [2 January 2021 08:49 UTC](https://talk.jelurida.com/t/storing-data-to-asset/108/5 "2021-01-02T08:49:35Z")

</div>

Yes, that's right. I mean someone could add the full hash of the original image to a fake asset but then my application will not consider that and my deadfish bot anyway has asset approval model for all transactions regarding the asset transfer.  
Ok, thanks! 🙂
