C++ streaming file upload with multi-part

Hi Experts,

Can someone point me to the best library that will do multi-part streaming uploads of a file in C++?  While the file streams, I need to have progress update callbacks.

Thank  you!
Mike
LVL 1
threadyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

evilrixSenior Software Engineer (Avast)Commented:
If you are referring to streaming a file over a transport protocol your best bet for all round flexibility and cross platform availability is libcurl.

http://curl.haxx.se/libcurl/

It supports all major data transport protocols, including: DICT, FILE, FTP, FTPS, Gopher, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, Telnet and TFTP

And is available for the following platforms: Solaris, NetBSD, FreeBSD, OpenBSD, Darwin, HPUX, IRIX, AIX, Tru64, Linux, UnixWare, HURD, Windows, Amiga, OS/2, BeOs, Mac OS X, Ultrix, QNX, OpenVMS, RISC OS, Novell NetWare, DOS

Progress callbacks are also supported.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sarabandeCommented:
if you look for streaming at windows platform, you may look for MultipartFormDataStreamProvider class (managed c++).

see https://msdn.microsoft.com/en-us/library/system.net.http.multipartformdatastreamprovider%28v=vs.118%29.aspx

Sara
threadyAuthor Commented:
Thanks for your answers.  Libcurl might be a possibility for me.

Sara - I wish I could use that, but I'm in a native C++ app.  Definitely love the simplicity that c# offers...
Exploring ASP.NET Core: Fundamentals

Learn to build web apps and services, IoT apps, and mobile backends by covering the fundamentals of ASP.NET Core and  exploring the core foundations for app libraries.

sarabandeCommented:
you can mix native c++ with managed c++ in a visual c++ project. that allows to use both worlds even to use a c# assembly from c++.

but surely libcurl is worth a try before.

Sara
threadyAuthor Commented:
I've never done that before - I've called C# from C++ but the opposite seems a little more intimidating for some reason...
threadyAuthor Commented:
evilrix, if you know of any code samples to do the multipart upload with libcurl (or anything else), that would be really helpful.
threadyAuthor Commented:
I'm thinking a little more in general now and wondering which path to take to enable REST calls as well, and facilitating future expansion in this area in our application.

We're using VS2008 still at work, so I think the C++ rest SDK might not be an option.  I also don't see how to do multipart form upload with this.

Any thoughts?
sarabandeCommented:
We're using VS2008 still at work, so I think the C++ rest SDK might not be an option.
you can develop a vs 2013 dll using the SDK and call them from vs2008 programs. if you keep the interface simple (or use shared memory to exchange data) there shouldn't be any bigger issues.

Sara
threadyAuthor Commented:
Great suggestion, thank you Sara!
threadyAuthor Commented:
libcurl it is.  Thanks evilrix!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.