Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
How to use storage provider?

Hello!
I'm trying to upload file to storage, using storage provider, but I can't understand, what to do with a file generated with command of the storage-daemon-cli new-contract-message <BagID> <file> --query-id 0 --provider <address>
Can someone explain how should I use this file for message body?

1
1
Posted one year ago
Votes Newest

Answers 2


EQCfQ0jtpebRP69fDrgnQ83Ph4wncGCXc9NcoY_mlfHyvxU-

-3
-3
wiki
Posted one year ago

I found solution. Maybe it will be helpful for somebody.

I send message using ton-core js sdk:

const tempFilePath = './storage/saved2' // tempFile - file generated by daemon-cli

const payload = await fsPromise.readFile(tempFilePath, {encoding: 'base64'});
        
const payloadBase64 = Cell.fromBase64(payload)

await provider.internal(via, {
    value: "0.5",
    body: payloadBase64
});
  
  
Posted one year ago
Edited one year ago
7K Views
2 Answers
one year ago
one year ago
Tags