Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Direct link preview/uploading not working for the private uploadcare project #392

Open
sadashiv-sumasoft opened this issue Sep 21, 2023 · 0 comments
Labels

Comments

@sadashiv-sumasoft
Copy link

sadashiv-sumasoft commented Sep 21, 2023

Hello, I am using the @uploadcare/react-widget "^2.2.0" version for uploading the files into the uploadCare private project.
We have enabled the secure delivery for the files and showing the preview of file using the previewUrlCallback attribute of widget and getting signed the url from our backend.
The file upload through "file" tabs is working fine.

I wanted to integrate the "url" tab in the widget for the same purpose but I am getting the issue while uploading the file through the public url.
When I enter the public url in the "url" tab of widget and click on the upload button at bottom of same tab. It redirecting me to the inprogress tab after file upload complete it is thorowing error "something went wrong during the upload" as it is leading me to this screen I can not even click on the done button to close the widget dialog and go to next step although I can see the file is getting uploaded into my project successfully.
I have attached snapshot below.

PrivateDirectLinkUploadBug

When I upload it to the public uploadCare project It is working fine.

WithPublicBucketWorking

I am not able mmic the same issue on codesandbox for your understanding purpose.
Can you please look into this issue?

My Widget have configure like below.

<Widget
        ref={widgetApi}
        publicKey={
          props.usePublicBucket
            ? Config.uploadCare.UPLOADCARE_PUBLIC_BUCKET_KEY
            : Config.uploadCare.UPLOADCARE_PUBLIC_KEY
        }
        cdnBase={
          props.usePublicBucket ? Config.uploadCare.UPLOADCARE_PUBLIC_CDN_BASE : Config.uploadCare.UPLOADCARE_CDN_BASE
        }
        onFileSelect={props.onFileSelect ? props.onFileSelect : ""}
        previewUrlCallback={() => `${Config.apiGateway.URL}manuals/preview?url=${props.value}&token=${token}`}
        {someOtherProperties}
     />
     ```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant