Is it possible to create a file upload tunnel (server to server) with PHP without temp file overhead

StackOverflow https://stackoverflow.com/questions/17981543

Question

Let's clarify first things first. Since the year 2007 i'm using divShare to upload files into 'the cloud'. This is working okay but the service is in some ways a little outdated now and there are no plans of divShare to do something about it. Uploading is only possible with the outdated interface of divShare or some tools that needs Adobe Air or Java. I want to customize it myself with HTML5 drag and drop features for example.

I have an REST-API to their service and can upload files server-side but there is no Ajax-API that allows me to upload directly to their services with a customized upload method.

I don't want to hear to switch to another cloud service provider because it is too expensive to do this, I have many projects that rely on this service. The service is working OK (for downloads) so no reason to switch. Users use the divShare website (clumsy interface) to upload files or using the provided Java or Air application if possible.

As I wrote before, I can upload files directly server-side with their API. I can make an HTML form that can upload (a) file(s) to my server and after this upload it to the divShare service but this is very inefficient if you ask me, especially when uploading large files, mp3 files or video files. Besides, my server is not that powerful like divShare is.

The divShare API uses cURL to upload a file to their servers.

My question is: Is it possible to upload a file by tunnel the upload process or redirect it? In a matter that my server doesn't have to store the file temporarily? For example, is this possible with a StreamWrapper?

If you have any idea's, suggestions, questions, answers, please let me know.

Was it helpful?

Solution

Not possible with PHP, see also comments to this question above.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top