appsmith icon indicating copy to clipboard operation
appsmith copied to clipboard

[Feature]: S3 Integration: Show helpful message on S3 type mismatch base64 vs text. when uploading / reading file

Open AnandShahs123 opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

If the file data type is "text" in S3 and the data format is base 64 in the filepicker widget, the signed URL is generated which doesn't rendered the file/ image.

Expected behaviour - Either the signed URL should not be generated OR the URL should render the result.

Steps To Reproduce

  1. Create a S3 datasource
  2. Create a create a new file query
  3. Use a file picker widget
  4. set the data format as base64 in filepicker widget
  5. set the data type as text in S3

Observe - A signed URL is generated which doesn't give the uploaded file

Public Sample App

No response

Environment

Production

Issue video log

No response

Version

1.9.15

AnandShahs123 avatar Apr 11 '23 10:04 AnandShahs123

Tried to repro. If I understand correctly, you selected "Text/Binary" as "File Data Type" in the query. This looks fine to me. The widget uploads the file in base64 format. The uploaded file gets converted to base64 encoding. The same base64 encoded data gets saved in text format when you upload the file. You should select "base64" in the query as well, so that it renders the encoding correctly.

piyushkrmaurya avatar Apr 12 '23 04:04 piyushkrmaurya

Yes, I understand ideally a developer should select "base64" in the query. However, if by mistake he doesn't do so .. we should show an error. @piyushkrmaurya

AnandShahs123 avatar Apr 12 '23 15:04 AnandShahs123