Sending/Streaming large files in an automated fashion via http (and avoiding the firewall)
I've created a VBScript that collects event data from a Windows machine and stores it in a CSV file.
I want to upload this data via http back to our office server, but the file sizes are quite large. So i looked at some multipart/streaming solutions, but im told that if i initiate these file uploads programmatically, any http proxies or firewalls will block/deny the requests?
Can anyone confirm if that is indeed true, and what would a way to get around that? I need to have a programmed solution in place to upload the fi开发者_JAVA百科les, and i cant rely on an end-user to manually invoke the upload (as i understand that would get around the firewall/http proxy issue)
Can anyone help or advise on this matter?
I found this previous answer, but wasnt sure if it applies to me? Is this solution programmatically imitating a browser file upload request, or will it ask the user to 'pick the file'?
Upload files with HTTPWebrequest (multipart/form-data)
To know if it will be blocked you would have to try it, if you have some code you tried we could help you with errors you encounter. Some general advise:
Compress the CSV before sending, the gains could be impressive.
Try to use a synchronising service like dropbox, it passes some firewalls if properly configured.
If security is not a big issue and the FTP port is open in the firewall you could try to transfer it with FTP, there are vbs scripts that do this but you will have to fiddle until it works.
If abolutely nothing else works you can use a regular browser and have a script interact with it. You could try it with the AutoIt ActiveX, don't try this with sendkeys.
If you are wanting to learn, try another language, it would be for more easy to do this in a language like Ruby which has far more options to use internet communication and handle proxy's etc.
精彩评论