script to upload from URL
Evgeniy Ginzburg
nad.oby at gmail.com
Tue Dec 13 22:28:05 IST 2011
Hi.
Do second prototype using another language use libcurl it have
CURLOPT_NOPROGRESS, use AJAX as envelope.
For really big files it may be better to create some progress log or
read file size from filesysem directly with AJAX callback function to
check it status periodically.
2011/12/13 David Ronkin <dronkin at gmail.com>:
> Call it asynchronously with ajax or jquery get/post - while waiting for
> response you can print whatever you what.
>
> David
>
> --
> בברכה,
> דוד רונקין
> נא בקרו בבלוג שלי: http://dronkin.blogspot.com
>
>
> 2011/12/13 Hetz Ben Hamo <hetzbh at gmail.com>
>>
>> Hi,
>>
>> I've written a simple bash script to upload a file from a remote server as
>> a CGI script (yes, I know, I should use another language, but it's just a
>> proof-of-concept).
>>
>> It goes like this: A simple HTML page gives the user a text line to enter
>> a URL and "upload" button, which submits the data using POST to a bash
>> script (I use the proccgi for transferring the values).
>>
>> The scripts fetches the URL and launches wget to grab the file, rename it
>> and move it to a specific directory.
>>
>> So far, so good. The script works well.
>>
>> But I have one issue with it: those files are pretty big (1-3 GB) and wget
>> doesn't show anything while it uploads - in the web browser. I tried using
>> some redirect tricks, but it still doesn't show anything on the screen. I
>> can redirect the output to a text file and show it after the upload, but it
>> defeats the purpose of showing some activity.
>>
>> So my question: how can I make WGET (or CURL) show anything on my browser
>> while it downloads the file (uploading it to the server)?
>>
>> Thanks,
>> Hetz
>>
>> _______________________________________________
>> Linux-il mailing list
>> Linux-il at cs.huji.ac.il
>> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Linux-il mailing list
> Linux-il at cs.huji.ac.il
> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
>
--
So long, and thanks for all the fish.
More information about the Linux-il
mailing list