Hi Vandita,

You can use the ?byte? data type to transfer a file.
Let me share you the example representation so that you could get a tip for 
your need.

     /file/transfer
     {
          rt          : [?x.com <http://x.com/>.mycompany.file.transfer?],
          if           : [?oic.if.s?],
          blob       : ?alsutomqcijrt;oqmjrogkjmdiou209?..(byte string value) 
?,     <? BYTE data type
          size       : 1000                                                     
                                   <? int64_t data type.
     }

I have tested with 50MB file and it worked fine.
However, you will need to check and find the proper file size which meets your 
goal
?cause the speed performance varies based on the file size.

I hope this would help you.

Thank you.
Jay. 


> 2017. 2. 18. ?? 4:18, Venuturapalli, Vandita <vandita.venuturapalli at 
> intel.com> ??:
> 
> Hello,
>  
> Is there a mechanism to send Files using IoTivity. I am looking to implement 
> file transfer between the server and client and have a few questions:
> 1.       This link (https://wiki.iotivity.org/block-wise_transfer 
> <https://wiki.iotivity.org/block-wise_transfer>) talks about block-wise 
> transfers.  Can this be extended to transfer files between the Client and 
> Server? What are the APIs I can use?
> 2.       Is there a limit on the size of the files transferred? 
> 3.       Can a file be considered as  a resource and be sent across devices?
>  
> I was wondering if anyone has come across these use cases before and could 
> help answer my questions.
>  
> Thank you,
> Vandita 
> _______________________________________________
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org <mailto:iotivity-dev at lists.iotivity.org>
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev 
> <https://lists.iotivity.org/mailman/listinfo/iotivity-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20170218/cdacb027/attachment.html>

Reply via email to