Jump to content

Fuandi

Members
  • Content Count

    5
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. Hi all, Currently i'm able to upload a file from my local drive to amazon s3 bucket. But when I want to upload it into the folder inside the bucket, it will give me error. Anyone can help ? let say the bucket name is bucket1 and the folder inside that bucket is folder1 I tried this Service.UploadObject('bucket1/folder1', ExtractFileName(fileName), bytes, TRUE, nil, nil, amzbaPrivate, info);
  2. Hi Remi, I tried with my other pc using delphi berlin with indy 10.6.2.5341, and it works with no error at all. I guess indy version 10.6.2.5298 got bug or something wrong. Thanks for the help and explanation so far.
  3. Yes, I already removed it. Below is my code. procedure TForm1.Button1Click(Sender: TObject); var xRequestBody: TStringList; begin IdOpenSSLSetLibPath(ExtractFilePath(ParamStr(0))); IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyMode := []; IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyDepth := 0; IdSSLIOHandlerSocketOpenSSL1.sslOptions.SSLVersions := [sslvTLSv1, sslvTLSv1_1, sslvTLSv1_2]; objHTTP.handleredirects := True; with objHTTP.Request do begin Clear; UserAgent := 'Mozilla/3.0 (compatible)'; ContentType := 'application/x-www-form-urlencoded'; BasicAuthentication := True; UserName := 'hello'; Password := 'world'; end; xRequestBody := TStringList.Create; try xRequestBody.Add('grant_type=' + 'client_credentials'); try memo1.Text := objHTTP.Post('https://something', xRequestBody); except on E: Exception do ShowMessage('Error on request: ' + #13#10 + e.Message); end; finally xRequestBody.Free; end; end;
  4. Hi Remi, Thanks for the suggestion. Now I getting this error raised exception class EidOSSLUnderlyingCryptoError with message 'Error connectiong with SSL. error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
  5. Is anyone able to help ? I'm trying to call an API with this code snippet below, but I got error:1408F10B:SSL3_GET_RECORD:wrong version number I'm using INDY version 10.6.2.5298 with delphi seattle. Also downloaded libeay32.dll and ssleay32.dll (I forgot which version) and put in same folder with the exe. procedure TForm1.Button1Click(Sender: TObject); var xRequestBody: TStringList; begin IdOpenSSLSetLibPath(ExtractFilePath(ParamStr(0))); IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyMode := []; IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyDepth := 0; IdSSLIOHandlerSocketOpenSSL1.sslOptions.Method := sslvSSLv3; IdSSLIOHandlerSocketOpenSSL1.sslOptions.SSLVersions := [sslvSSLv3]; IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyMode := []; IdSSLIOHandlerSocketOpenSSL1.sslOptions.VerifyDepth := 0; IdSSLIOHandlerSocketOpenSSL1.PassThrough := false; objHTTP.handleredirects := True; objHTTP.Request.UserAgent := 'Mozilla/3.0 (compatible)'; with objHTTP.Request do begin Clear; ContentType := 'application/x-www-form-urlencoded'; BasicAuthentication := True; UserName := 'test'; Password := 'test'; end; xRequestBody := TStringList.Create; try xRequestBody.Add('grant_type=' + 'client_credentials'); try memo1.Text := objHTTP.Post('https://something', xRequestBody); except on E: Exception do ShowMessage('Error on request: ' + #13#10 + e.Message); end; finally xRequestBody.Free; end; end;
×