ngoctubk / Umbraco.StorageProviders.S3

S3 Blob Storage file system provider for Umbraco CMS.
MIT License
0 stars 0 forks source link

Error While Uploading Media says Amazon.S3.AmazonS3Exception: The specified key does not exist. #1

Closed NijasHameed closed 2 weeks ago

NijasHameed commented 2 weeks ago

I have followed all the steps outlined in the documentation for integrating media uploads with Umbraco. However, I am encountering an issue where the media files are successfully uploading to the S3 bucket, but they are not being created in Umbraco

Amazon.S3.AmazonS3Exception: The specified key does not exist. ---> Amazon.Runtime.Internal.HttpErrorResponseException: Exception of type 'Amazon.Runtime.Internal.HttpErrorResponseException' was thrown. at Amazon.Runtime.HttpWebRequestMessage.ProcessHttpResponseMessage(HttpResponseMessage responseMessage) at Amazon.Runtime.HttpWebRequestMessage.GetResponseAsync(CancellationToken cancellationToken) at Amazon.Runtime.Internal.HttpHandler1.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.RedirectHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.Unmarshaller.InvokeAsync[T](IExecutionContext executionContext) at Amazon.S3.Internal.AmazonS3ResponseHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext) --- End of inner exception stack trace --- at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionStream(IRequestContext requestContext, IWebResponseData httpErrorResponse, HttpErrorResponseException exception, Stream responseStream) at Amazon.Runtime.Internal.HttpErrorResponseExceptionHandler.HandleExceptionAsync(IExecutionContext executionContext, HttpErrorResponseException exception) at Amazon.Runtime.Internal.ExceptionHandler1.HandleAsync(IExecutionContext executionContext, Exception exception) at Amazon.Runtime.Internal.ErrorHandler.ProcessExceptionAsync(IExecutionContext executionContext, Exception exception) at Amazon.Runtime.Internal.ErrorHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.Signer.InvokeAsync[T](IExecutionContext executionContext) at Amazon.S3.Internal.S3Express.S3ExpressPreSigner.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.EndpointDiscoveryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CredentialsRetriever.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.RetryHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.CallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.S3.Internal.AmazonS3ExceptionHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.ErrorCallbackHandler.InvokeAsync[T](IExecutionContext executionContext) at Amazon.Runtime.Internal.MetricsHandler.InvokeAsync[T](IExecutionContext executionContext) at Common.Umbraco.StorageProviders.S3.IO.S3FileSystem.<>cDisplayClass18_0.<b0>d.MoveNext() --- End of stack trace from previous location --- at Common.Umbraco.StorageProviders.S3.IO.S3FileSystem.FileExists(String path) at Umbraco.Cms.Core.IO.ShadowWrapper.FileExists(String path) at Umbraco.Cms.Core.Media.UploadAutoFillProperties.Populate(IContentBase content, ImagingAutoFillUploadField autoFillConfig, String filepath, String culture, String segment) at Umbraco.Cms.Core.PropertyEditors.ImageCropperPropertyEditor.AutoFillProperties(IContentBase model) at Umbraco.Cms.Core.PropertyEditors.ImageCropperPropertyEditor.Handle(MediaSavingNotification notification) at Umbraco.Cms.Core.Events.INotificationHandler1.Handle(IEnumerable1 notifications) at Umbraco.Cms.Core.Events.EventAggregator.PublishCore[TNotification](IEnumerable1 allHandlers, IEnumerable1 notifications) at Umbraco.Cms.Core.Events.NotificationHandlerWrapperImpl1.Handle[TNotification,TNotificationHandler](IEnumerable1 notifications, ServiceFactory serviceFactory, Action2 publish) at Umbraco.Cms.Core.Events.EventAggregator.PublishNotifications[TNotification,TNotificationHandler](IEnumerable1 notifications) at Umbraco.Cms.Core.Events.EventAggregator.Publish[TNotification,TNotificationHandler](IEnumerable1 notifications) at Umbraco.Cms.Core.Events.EventAggregator.Publish[TNotification](TNotification notification) at Umbraco.Cms.Core.Events.ScopedNotificationPublisher1.PublishCancelable(ICancelableNotification notification) at Umbraco.Cms.Core.Services.MediaService.Save(IMedia media, Int32 userId) at Umbraco.Cms.Web.BackOffice.Controllers.MediaController.PostAddFile(String path, String currentFolder, String contentTypeAlias, List`1 file) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.gAwaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)

NijasHameed commented 2 weeks ago

Sorry, it was the issue with the wrong service url, The service url is region specific and it can find out from the below AWS documentation.

https://docs.aws.amazon.com/general/latest/gr/s3.html