My Desktop app used to use CURLSMBS.InputData to send local files to my AWS bucket. This has worked well until I have found it balks at large files (I tried a 2.3 GB video file):
newPathName = "/" + AWSBucketName + "/" + serverFolderName + "/" + userFolderName + "/" + f.Name
myCURLSMBS = New classCURLSMBS
myCURLSMBS.OptionVerbose = False
myCURLSMBS.OptionUpload = True
myCURLSMBS.InputData = myBinaryStream.Read(f.Length)
myBinaryStream.Close
Call myCURLSMBS.SetupAWS(AWSAccessKeyID, AWSSecretAccessKey, AWSRegion, AWSService, newPathName, AWSDomain, "PUT")
returnValue = myCURLSMBS.PerformMT
So today I am instead trying OpenMTInputFile with everything else identical:
newPathName = "/" + AWSBucketName + "/" + serverFolderName + "/" + userFolderName + "/" + f.Name
myCURLSMBS = New classCURLSMBS
myCURLSMBS.OptionVerbose = False
myCURLSMBS.OptionUpload = True
if not myCURLSMBS.OpenMTInputFile(f) then
Return "Unable to open file stream"
end if
Call myCURLSMBS.SetupAWS(AWSAccessKeyID, AWSSecretAccessKey, AWSRegion, AWSService, newPathName, AWSDomain, "PUT")
returnValue = myCURLSMBS.PerformMT
myCURLSMBS.CloseMTInputFile
Both methods show the progress of the file being sent to the AWS server, run the Finished event and return a zero result, but in the second case (even with a tiny file) no file appears in the AWS anywhere at all! I have tried with both Perform and PerformMT, but still no file at all.
- Is there a limit to the file size of CURLSMBS.InputData?
- Should CURLSMBS.OpenMTInputFile be able to handle any size file?
- Where is CURLSMBS.OpenMTInputFile placing the uploaded file, if not in newPathName?