How to link a storage bucket file into an item in a table - supabase

How can I link a file in my storage bucket into a table?
Let's say I have an item like this
Name: user, CreatedAt: date, pfp: storageFile
I want the file to be linked to the pfp field.

You would store the image URL in your database table. You can follow on of the user management tutorials here: https://supabase.com/docs/guides/getting-started/tutorials/with-react#bonus-profile-photos

Related

deleting an s3 bucket in golang, how to find the user id?

I have a small piece of golang that creates a bucket on s3, does a few things with it, and in the end, I want to delete that bucket that I created. But in the input parameters of DeleteBucket, it's mandatory to specify the account ID of the bucket owner.
I'm struggling to figure out programmatically the account ID used by my own program. I don't want to hardcode it nor to ask the user to specify it. I also tried to get the owner of the bucket with GetBucketAcl and friends, but all these also require the account ID.
Any advice on getting the account id?

upload and dowanload Files in ORACLE APEX

i have costumer's every one i have to upload mullite files
so is there any way to get it?
i create table with
FILE_NAME
FILE_MINETYPE
FILE_CHARSET
i see many video's but they aren't useful for me
You need to create a Page Item with the type File Browse.... Then, under Storage Type, you can use your own custom table or you can use APEX_APPLICATION_TEMP_FILES.
If you use APEX_APPLICATION_TEMP_FILES it will automatically save information about the file type such as file name, mime type, etc. If you use a custom table, you will need to designate which column in the table should hold which file attribute.
You will also need a button or some way of submitting the page. Once the page is submitted, the files will be uploaded and saved to the database.

Use one quicksight dashboard (created from one analysis) for different data sets

I have a multi-user website and each user has own data which I can store on s3.
I want to integrate(embed) QuickSight to my website, in that way so each user able to see own data.
I want to have one analysis to be able to modify if for all users.
Are there some recommendations on how to achieve this?
Firstly, you will need to add the user's identifier (email, name, generated ID, whatever) to each row that belongs to them in the S3 data. I'm kind of assuming that you are storing the data in a tabular format (e.g. CSV) but let me know if I'm wrong. So let's assume you added this user identifier as a new column called userId.
Secondly, you will need to generate a manifest file that points to all of your users' S3 files.
Then, create a new data set, pointing to that manifest.
Then, you will need to create another new data set that ties a QuickSight UserName to the new userId column you have added. You will need to maintain this data set somehow, but fortunately the QuickSight UserName has a pattern to it (something like embed_role\user_name).
An example of this new data set might look like
UserName,userId
your_embed_role\user3479125,user3479125
Once you have this data set you can attach it to the S3 data set created earlier as row-level-security (RLS). You can think of QuickSight as performing an inner join on userId between the RLS data set and the actual visual data set, thus limiting the data to the given UserName.

apex_util.get_blob was not found on this server

I am trying to develop an interactive report in which I am using blob column to download the blob file (that could be jpeg or pdf). I created the download field on the blob column but, when I clicked on it, it gives an error as mentioned below.
"The requested URL /apex/apex_util.get_blob was not found on this server"
Note: I am using oracle apex 5.1.2.
Can anybody please help me to resolve this error.
Suppose that BLOB column is named BLOB_COLUMN, and it contains JPEG or PDF. It is one of column in SELECT statement you used to create an interactive report.
By default, BLOB_COLUMN's type is "Plain text". If you just changed it to Download BLOB and filled required BLOB attributes, well - it won't work.
Instead, you should create yet another column in IR's SELECT:
select ...,
dbms_lob.getlength(blob_column) download_blob
from ...
and apply BLOB attributes to it. I've just tried it on apex.oracle.com, works as expected. If it still doesn't work for you, please, create an example on the same site, provide credentials so that someone of us might have a look.
at the BLOB attributes there is a Primary key column. The get_blob uses the same column value from the report to fetch the blob from the given table. So, if you have two ID columns in two tables (joined report) you have to create a view for the other table and use an other column name as ID in it. Use this view and the new ID column name as a PK.

How to associate row with a user in Parse.com?

How to create a column in parse.com such that I can associate each row with a particular user? Also how to protect each row with the user so that others can not perform data modification on that particular row?
For most purposes, you want a Pointer column to the user.
For securing your data to that particular user, you'll want to look at object-level access control. You should be able to find most of what you need in the guide: https://parse.com/docs/ios/guide#security-object-level-access-control
(There are also similar guides for JS and Android)
Per this link: https://parse.com/questions/data-unique-to-user on the parse site, add a column that is a User to the table you want associate. Then use Parse.user.currentUser() to set that value.

Resources