Open firdapaz opened 2 years ago
Hi @firdapaz - currently attachment fields are not supported for anything other than the internal database - this is something we may look at in the future.
Hi @firdapaz - currently attachment fields are not supported for anything other than the internal database - this is something we may look at in the future.
can you explain what do you mean by "internal database" ??
Hi @mituBarua, by internal database I mean the internal tables that can be created within a Budibase app without the need for an external datasource.
You can see these tables marked as "Budibase DB" when creating a new table/datasource.
if i use mysql db ,so how can i attach file?
@mituBarua currently we do not support attachments in any other database, it will be possible to use the "S3 File Upload" component to upload files to the built in MinIO instance, or to some other S3 based environment, but we do not currently support the file/binary column types of any external datasources.
This is the new S3 file upload component, as part of the form components.
ok thanks a lot , i have another query, How can i implement google map getting current location or any other location? Please help regarding this issue also
i don't understand why S3 File Upload is not showing in my form dropdown.
i don't understand why S3 File Upload is not showing in my form dropdown.
Hi @mituBarua. Could you check what Budibase version you're using? We only released the S3 upload component recently, so you'll need to update your installation to the latest version, and then also update your app to the latest Budibase client version when that is done. The app can be updated using the arrows icon in the top right of the header, and it will be blue whenever an upgrade is available after you have updated your installation version first.
@aptkingston I am using 1.0.46 version of budibase still it is not showing s3 upload. Please help
On Mon, Feb 7, 2022 at 8:15 PM Andrew Kingston @.***> wrote:
[image: Screenshot from 2022-02-07 19-44-07] https://user-images.githubusercontent.com/64905702/152800692-91ee4b4d-2221-4e17-aca5-58286990b9ee.png
i don't understand why S3 File Upload is not showing in my form dropdown.
Hi @mituBarua https://github.com/mituBarua. Could you check what Budibase version you're using? We only released the S3 upload component recently, so you'll need to update your installation to the latest version, and then also update your app to the latest Budibase client version when that is done. The app can be updated using the arrows icon in the top right of the header, and it will be blue whenever an upgrade is available after you have updated your installation version first.
— Reply to this email directly, view it on GitHub https://github.com/Budibase/budibase/issues/4302#issuecomment-1031513930, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPGDZTLURBVONQ6LHPG2FTUZ7HWLANCNFSM5NN47BQQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Hi, i already use s3 but my s3 Datasource is empty even i insert inside data provider
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I'm using mysql 8.0 which supports json data type. I really would like to use attachments (not aws s3) with my mysql db. Are there any workarounds for this? I should be able to grab the generated json from attachment component and save it to mysql but i can not set it back to the component because it complains data type for component is incompatible. But it actually is.
Please add attachment fields to external databse
this would be most useful for me too
+1 this, either add support for attachment upload to server directory, or allow to add external object db other than AWS (like access to build-in MinIO)
+1 this. This is a tremendous limitation of Budibase if you're migrating from an existing MySQL database.
I'm using this workaround:
(the name for the field value can be anything)
When you see the preview appearing, the file is already uploaded to the internal minio_DB.
{{ New Form.Fields.attachment.[0].key }}
-> this gets you something like:
key=app_4c89fb50ab18fc30fba9895be75647cd/attachments/75f45a0a-4f89-5738-a016-02f215e930e1.png
So url to acces this file: BASEURL/prod-budi-app-assets/key example: www.mybdb.com/prod-budi-app-assets/75f45a0a-4f89-5738-a016-02f215e930e1.png
{{ New Form.Fields.attachment.[0].url }}
-> this gets you something like:
URL= /files/signed/prod-budi-app-assets/app_4c89cdab18fc30fba9895bfb50e75647/attachments/75f45a0a-4f89-5738-a016-02f215e930e1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=supersecret%2F20230304%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230304T221406Z&X-Amz-Expires=3600&X-Amz-Signature=supersecretsignature&X-Amz-SignedHeaders=host
So url to acces this file: BASEURL/URL example: https://www.mybdb.com/files/signed/prod-budi-app-assets/app_4c89fb50e18fc30fba9895b75647cdab/attachments/75f45a0a-5738-4f89-a016-02f215e930e1.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=secret%2F20230304%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20230304T221406Z&X-Amz-Expires=3600&X-Amz-Signature=supersecret&X-Amz-SignedHeaders=host
REMARK:
for method 2.1 you need to login to your minio DB and set the bucket prod-budi-app-assets
to PUBLIC, otherwise you will get an error when you try to acces the file
for method 2.2 this is not neccesary, however i am not using it this way and I am unsure if this link will expire and render it useless. Maybe somebody with some S3 experience can answer this one?
Use a button to write the value to your database of choice (you can even iterate and send multiple attachments). Clear the form after storing the value(s).
(if you want to delete the row from your database of choice, you can delete the actual file using this method) I am using the budibase API from inside budibase (REST datasource).
for the BASEURL you can use http://serverip:port or https://yourbudibase.com
NOTE: the value we need to use = bucketname/folder/filename, which happens to be the same value as 2.1
supporting a blob type would be very useful. I use it in my current solution that is going away for our employee directory.
+1
it will be possible to use the "S3 File Upload" component to upload files to the built in MinIO instance, or to some other S3 based environment
This is not true as of 2.9.30. I installed Budibase from DigitalOcean marketplace, and also added a space and a postgres cluster. The S3 upload component says it will not work with custom S3 endpoints, thus eliminating for me the possibility to use DO spaces and any external MinIO instances that I could roll out on my own on K8s or bare metal instead of DO space. This sounds strange to me, because I myself implemented S3 uploads to different environments, both to DO spaces and MinIO, using Javascript and Python. Even though there are differences in API (there are S3 bucket policies in DO those Minio does not support), these environments are very similar, and I do not understand, why you limit this component to Amazon S3.
I also did not find how to use Attachment control in my environment.
Do I understand it right that if I am using an external relational database (posgres or mysql) together with anything else than Amazon S3, I am out of luck with file uploads altogether?
Describe the bug Hi, I have image column that have bytea datatype on my postgresql. but when i want to make fields attachment it is always show error "This field setting is wrong data type for this component" What data type i should use for image on my postgresql?
Screenshots