I have a GRPC file-upload server(C#) running and I also have GRPC-client through which I was uploading files to the GRPC server but now I want to upload my file using postman(yes the new postman version supports GRPC) and now I am not able to figure out how to attach/send the file via the GRPC-postman to my GRPC-server ,for example in REST-postman u r able attach the file in body using FORM-DATA tab. can anyone give me a solution to this
Thank you
I am able to upload files through forms using Flask but what I require is to be able to put the local file path in the URL and then flask can upload the file and process it. How do I do this?
well this is just not how a webserver works. If you want it to process the data locally stored on your computer you need to send it via a POST request.
Cheers, T
I want to upload a file into Amazon S3. Is it possible to upload a file into S3 using cffile action="upload" in Adobe's ColdFusion server? When I tried uploading a file, it's throwing an error:
The cause of this exception was:
org.apache.commons.vfs2.FileSystemException: Unknown message with code
"S3 Error Message."..
My CFFile action code is :
<cffile action="upload"
filefield = "FileContents"
destination = "s3://accessKey:secretAccesskey#bucketname"
nameconflict="makeunique"
charset="utf-8">
What mistake am I making here? How can I use cffile action="upload" to upload a file into S3? Some of my friends say that it is working on a Lucee server.
I've also thought about trying to use the cfhttp tag to upload into the S3 bucket, but would like to know how to use cffile action="upload" and what are the supported cffile actions for Amazon S3.
Could anyone help me understand? Thanks much in advance!
Can somebody point me to an example of doing multipart upload using ng-file-upload. Also if the upload can be paused/resumed (like when the internet goes down or user puts the machine to sleep).
Thanks.
I switched to evaporate.js for multipart upload.
I am using the http://phpseclib.sourceforge.net/ library for file uploading using ftp.Now I cant able to understand the concept behind this "how the ftp handling the file data while uploading".
what happend is:
I created the form for file upload with submit button.When I choose the file and click on submit the loader starts.But the file not coming into server.My expectation is when I click the submit button it reads the data from the file and push into the server depending upon the packet size mentioned in phpseclib.
Any one explained me what I misunderstood or whats happening while the loader showing in the browser?
EDIT:
File upload has no issues.Only thing is why its called so late.So while uploading whether the php move the file to server into some tempdirectories. If so why I need to go for ftp upload.
I tested with 100Mb files.Files are uploaded.What my expectation is why it doesnt start immediately after click submit button?
Do you have enctype="multipart/form-data" for your form?
In html, forms need the enctype="multipart/form-data" attribute to upload a file.
The form usually looks like this:
<form id="form_id" enctype="multipart/form-data" method="POST">
<input type="file" name="file" />
<input type="submit" name="submit" value="submit" />
</form>
I'm confused. Can you post the relevant PHP code that shows
your handling of the POST request that uploads the file
how you call the FTP library to initiate the FTP transfer
What I think is happening is this: your user uploads a file to your webserver, then you initiate FTP from your webserver to the FTP server. There are 2 uploads here; 1 via HTTP and 1 via FTP. You won't see the FTP upload commence until the HTTP upload is complete.
Great question, you are dealing with 2 transaction here. The first transaction puts the file into a location on your web server. This uses HTTP as a transport via a POST method (also likely the slowest part of this transaction).
Once the initial client side upload is complete the file will be stored on your web server where a S/FTP script can now transfer.
Reading the comment below what you wanted was to transfer the file using FTP from the client side, and that's a perfectly viable solution. However this is the current process you implemented.
Your process currently.
User A uploads a file via HTTP using a web page you host.
User A waits until file upload has completed before closing his browser.
File is saved in the directory path specified in the upload script.
S/FTP script reads the file and initiates a connection with a foreign S/FTP server and begins transferring the file to that server.
If step 4 is redundant then the S/FTP script is not required at all unless what you wanted was to transfer via S/FTP from the client.
Your intention.
User A uploads a file via S/FTP using a browser based S/FTP client.
User A waits for file upload to complete.
File is saved in the directory path specified in the upload script.
In the comments you mentioned possibly implementing a Flex solution. Here are some resources I found that might help.
Flex FTP based client
Flex based FTP Client question on Stack Exchange
Implement a S/FTP client on the server side with PHPSecLib.
SFTP.php on Gist (for line numbers and highlighting)
Original PHPSec SFTP.php
I copied the original via the Sourceforge site to Gist so you can use the line numbers as a guide. The SFTP library expects either a full path to file (i.e /tmp/somefilehere ) or a valid PHP file resource. Like the one returned by fopen $fp = #fopen('/tmp/somefilehere', 'rb'); see line 1132 on gist for an example.
Once authenticated the transfer will be pretty quick compared to the initial upload. Your Server is likely in a data centre with much more bandwidth so file transfers are much faster.
You probably want to initiate a S/FTP transaction via your web browser. Its possible just not with conventional scripting languages like PHP / Python or Ruby. You can S/FTP from the browser with Flash, Flex or Java and probably some Windows technologies too.