Calculating data size without storing in database

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Calculating data size without storing in database

Anthony Taboada
Hi,

I am in the process of integrating the Microsoft Azure Storage REST API with eXist-db.  When uploading files (both XML and binary) to Azure, the authentication requires Content-Length information in the string-to-sign.

I want to upload data that is not stored in my database, so I am currently saving a temporary copy of the data, retrieving the file size in bytes using xmldb:size(), and then deleting the temporary file.

Is there another method of obtaining data size without having to store it in the database first?  

Thanks,

Anthony Taboada
Software Developer & Digital Operations
NueMeta LLC
Digital Media & Technology


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Calculating data size without storing in database

Alister Pillow-3
Hi Anthony
Where are the files uploaded from? If they are being uploaded from a modern browser, you can use the File interface to get the size.


Regards,
Alister

On 22 Feb 2017, at 2:30 am, Anthony Taboada <[hidden email]> wrote:

Hi,

I am in the process of integrating the Microsoft Azure Storage REST API with eXist-db.  When uploading files (both XML and binary) to Azure, the authentication requires Content-Length information in the string-to-sign.

I want to upload data that is not stored in my database, so I am currently saving a temporary copy of the data, retrieving the file size in bytes using xmldb:size(), and then deleting the temporary file.

Is there another method of obtaining data size without having to store it in the database first?  

Thanks,

Anthony Taboada
Software Developer & Digital Operations
NueMeta LLC
Digital Media & Technology

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...