AWS S3 url Not working

Using the example, our host url works using /api/test/. Once the host url is being used in the FileManagerComponent there is a httprequest error. 


let hostUrl = 'http://12.345.678.999:0000/'

<FileManagerComponent id="overview_file"
              ajaxSettings = {{
                url: hostUrl + 'api/FTPProvider/FTPFileOperations',
                getImageUrl: hostUrl + 'api/FTPProvider/FTPGetImage',
                uploadUrl: hostUrl + 'api/FTPProvider/FTPUpload',
                downloadUrl: hostUrl + 'api/FTPProvider/FTPDownload'
            }}
/>

6 Replies 1 reply marked as answer

MK Muthukrishnan Kandasamy Syncfusion Team October 22, 2020 11:54 AM UTC

 
Hi Lester, 
 
Thanks for contacting Syncfusion support. 
 
We have validated your reported problem in File Manager component. From your shard code, we found that you are using FTP file provider for File Manager component. The FTP service was working fine in our end. Please ensure it from your end, whether you have entered the correction FTP connection details. Please refer to the below code block. 
 
[FTPProviderController.cs] 
 
public FTPProviderController(IHostingEnvironment hostingEnvironment) 
        { 
            this.operation = new FTPFileProvider(); 
            //Specify the FTP hostname, username and password 
            this.operation.SetFTPConnection("ftp://xxx.xx.xx.xxx/", "xxxxx", "xxxxx"); 
        } 
 
Please refer to the below documentation to know about working with FTP with File Manager. 
 
 
We can get the FTP service from the below GitHub link. 
 
 
Please refer to the below link for the sample. 
 
 
 
 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 


Marked as answer

LE Lester October 22, 2020 04:20 PM UTC

Sorry we tried to pivot to FTP and it did not work for us. The original question was for Amazon S3 which we were trying to work with originally. 


The example did not work for us. We used the exact api calls with our own host URL and it did not work.

let hostUrl = 'http://12.345.678.999:0000/api/Amazons3Provider'

<FileManagerComponent id="overview_file"
              ajaxSettings = {{
url: hostUrl +'AmazonS3FileOperations', getImageUrl: hostUrl + 'AmazonS3GetImage', uploadUrl: hostUrl + 'AmazonS3Upload', downloadUrl: hostUrl + 'AmazonS3Download'
            }}
/>

Regards, 
Lester




MK Muthukrishnan Kandasamy Syncfusion Team October 23, 2020 11:46 AM UTC

 
Hi Lester, 
 
Thanks for the update. 
 
We have validated your reported problem in File Manager component. The Amazon service was working fine in our end. Please ensure it from your end, whether you have entered the exact bucket name and access id for connecting the amazon service. Please refer to the below code block. 
 
[AmazonS3ProviderController.cs] 
 
public AmazonS3ProviderController(IHostingEnvironment hostingEnvironment) 
        { 
            this.basePath = hostingEnvironment.ContentRootPath; 
            this.operation = new AmazonS3FileProvider(); 
            this.operation.RegisterAmazonS3("<---bucketName--->", "<---awsAccessKeyId--->", "<---awsSecretAccessKey--->", "<---region--->"); 
      } 
 
Please refer to the below documentation to know about working with Amazon service with File Manager. 
 
 
We can get the Amazon service from the below GitHub link. 
 
 
Please refer to the below link for the sample. 
 
 
If the issue still persists, please share the issue replicating sample or replicate the issue in the shared sample. It will be help us to provide you the prompt solution. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 
 



LE Lester October 23, 2020 03:59 PM UTC

Am I not seeing this correctly? The link you sent through stackblitz still says a httprequesterror when I view it. 


KJ Kenneth Jung October 23, 2020 04:23 PM UTC

Hi Muthukrishnan,

When I try to use the sample code which syncfusion has provided on your website.

 https://ej2.syncfusion.com/demos/#/material/file-manager/amazon-s3-provider.html
  
                  

The error message is still pop up like the above. I wonder that the syncfusion's backend('https://amazons3.azurewebsites.net/api/AmazonS3Provider/') works or not. 

We already put the dotnet application into our EC2 instance and the api/test is working well.

But we get the same error when we try to use the source code for our application.

It looks something was changed in the AWS S3 policy or code.

Please check the demo for the sample code ( https://ej2.syncfusion.com/demos/#/material/file-manager/amazon-s3-provider.html)

Thanks.


Best Regards,

Kenneth


MK Muthukrishnan Kandasamy Syncfusion Team October 26, 2020 11:43 AM UTC

 
Hi Lester, 
 
Sorry for the inconvenience. 
 
Due to some technical problem in server machine Syncfusion File Manager’ s Amazon service demo sample was not loaded properly. We have resolved the issue in our machine and the server is up now.  
 
In our previous update, we have shared the stackblitz sample. To run that sample, we need to run the amazon service in your machine locally. Also, please ensure whether you have referred the proper connection details as mentioned in the previous update. 
 
Note: Some browser may block the cross origin request, for this scenario we need to enable CORS. 
 
If the issue still persists, please share the issue replicating sample or replicate the issue in the shared sample. 
 
Please let us know, if you need any further assistance. 
 
Regards, 
Muthukrishnan K 


Loader.
Up arrow icon