In this example there are a few things to highlight: Sending them individually like this: #!/bin/shĬurl -X POST -user "$api_key:x" -F -F name=bigfile.zip -F chunk=0 -F chunks=2 $server/attachmentsĪttachment_id=`curl -X POST -user "$api_key:x" -F -F name=bigfile.zip -F chunk=1 -F chunks=2 $server/attachments` In this example, we're taking bigfile.zip, and splitting into two files: bigfile.zip.00 and bifile.zip.01 and A unique string representing the attachment id. The total number of piecesĪttachment ID # String. The current piece between 0-(number of pieces -1)Ĭhunks # Integer. This is needed because we no longer can use the filename from theĬhunk # Integer. Request Request URL: /attachmentsįiledata: # The html multiplart file data Unlimited (well, limited by disk space) file size. Sending files in chunks will get around this and enable files of Proxies struggle with files larger than 2Gb. And some devices such as Microsoft ISA and TMG Upload fails, the entire file doesn't have to be retransmitted. When completed the server will rebuild the complete file. This only works with the htmlįorm based upload and works by you splitting a large file in smaller pieces (chunks) and sending the chunks This will enable you to divide and send a large file uploaded in smaller pieces. Please note with this response that it's not your normal JSON formatted type response. Example Request using curl with Pool ID #!/bin/bashĪttachment_id=`curl -X POST -user "$api_key:x" -F -F pool_id='partner-pool' $server/attachments` If you enter '-F Filedata=bigfile.zip' without the it means send the string "bigfile.zip"Īs Filedata, that won't send the data from the file. Please note in this example that curl syntax of means to load the data from the fileīigfile.zip. # Uploading the actual file and get attachment id for each fileĪttachment_id=`curl -X POST -user "$api_key:x" -F $server/attachments` This will also send the files separate from the message, and we'll just include references to the files when It will enable us to send binary data as content, and the webserverĬan intercept this before the web application sees it and so on. Which would lead to the raw data being transmitted like this: Content-type: multipart/form-data boundary=AaB03xĬontent-disposition: form-data name="Filedata" filename="filename.ext" &linput type="file" name="Filedata" filename="filename.ext"> The only real problem with it is that it doesn'tĬonform to the API standard way of using JSON for everything, and can lead to some cludges when you're This is a much more efficient way of sending files than using JSON based uploads, but notĪs efficient as using the Binary Upload method. Then this document outlines how it works. If you're currently using HTML Form Based Uploads and wish to continue (for now) Please use the Binary Upload Method instead. Check out this answer to find out more - thanks starbeamrainbowlabs for the reference.Īpplication/Īpplication/Īpplication/Īpplication/Īpplication/ HTML Form Based Upload is considered Legacy and was removed in LiquidFiles v3.7. I wasn't aware that vendor extensions were allowed. The "mercy" of the sender, when receiving this type of data, sinceĭata will be executed on their system, and the security of theirĬomments This Media Type/OID is used to identify MicrosoftĮxcel generically (i.e., independent of version, subtype, or platform format). Recipients need to understand that they are at Intended for interpretation by a program that understands the data on Security considerations: As with most application types this data is Media Type: application/vnd.ms-excelĮncoding considerations: base64 preferred Note the concerns raised about being at the mercy of the sender and having your machine violated. Recently I discovered an explicit mimetype for Excel application/vnd.ms-excel. There is an RFC which covers it and says to use text/csv.
0 Comments
Leave a Reply. |