32
Views
8
Comments
Solved
[Reactive Multiple File Upload] Multi File Upload Forge can only be used for one project?
multiple-file-upload-reactive
Reactive icon
Forge asset by José Pedro Proença
Service Studio Version
11.54.76 (Build 63581)

Is the multi File upload forge component be used for one project only? 
Currently, I have one project which is using this forge. Now, when I create another new project and used the same FileMetaData, it gives me an error.... 

May I know how I can use the function across several projects instead of just one project only? 


Database Upgrade Error:

Column 'OSUSR_IAU_PARTNUMACCOUNTABILITY.FILEMETADATAID' exists in database as Binary Data (varbinary) but the new version is defined as Long Integer (BIGINT). Database varbinary columns can not be changed.

2021-01-21 14-05-49
José Pedro Proença
 
MVP
Solution

Hi, I'm the owner of the component, and to me the version with the temporary table is not the preferred option. Although it is easy to bootstrap the implementation, you'll end up with a bit of scattered logic.

What I do in my projects is use the binary data version of the component and then create an extension table (a table with just the binary data and a Foreign Key of the table where the rest of the data is stored, eg. "User" and "UserProfileImage") and simply call the "CreateOrUpdate" action of the extension table when the user clicks Save, to store the binary data of the file in the table.

This way you have complete control over the files, where they are stored and when they are deleted.

Hope this helps

UserImage.jpg
Chin Kai

Managed to get it working. Thanks!

2024-07-31 11-32-34
ndy

Dear @Chin Kai 

No, the Reactive Multiple File Upload Forge can be used in multiple applications. It's a reusable forge that you can add to any Reactive application you're working on.

The error message you're seeing indicates a conflict in the entity schema. Specifically, the FileMetaDataID attribute, which is crucial for the Reactive Multiple File Upload Forge component, is defined differently in your two projects. This mismatch prevents the database from being upgraded successfully.

Here are the potential solutions to this issue:

Create a separate database for your new application. This way, you can avoid conflicts and ensure that each project has its own independent entity schema.

UserImage.jpg
Chin Kai

"Create a separate database for your new application. This way, you can avoid conflicts and ensure that each project has its own independent entity schema. " 

You mean creating another "FileMetaData" and "Binary Data" entity?

2024-07-31 11-32-34
ndy

I mean the multi-tenant application. You can read document in below link.

How to build a multi-tenant application

UserImage.jpg
Chin Kai

Guide is not clear... 

From guide:
What I currently have(seems to be very different... unable to find the option to uncheck the Multitenant option...): 

UserImage.jpg
Chin Kai

Bump Thread.
Still unable to find solution. I have tried to build another entity similar. 

Database from multifileupload: 


my own replica, 


but somehow when I save a file. The binary file is saved to the multiFileUpload instead of my own database... Please advise.

2021-01-21 14-05-49
José Pedro Proença
 
MVP

Probably you're still using the Temporary table version of the webblock?

2021-01-21 14-05-49
José Pedro Proença
 
MVP
Solution

Hi, I'm the owner of the component, and to me the version with the temporary table is not the preferred option. Although it is easy to bootstrap the implementation, you'll end up with a bit of scattered logic.

What I do in my projects is use the binary data version of the component and then create an extension table (a table with just the binary data and a Foreign Key of the table where the rest of the data is stored, eg. "User" and "UserProfileImage") and simply call the "CreateOrUpdate" action of the extension table when the user clicks Save, to store the binary data of the file in the table.

This way you have complete control over the files, where they are stored and when they are deleted.

Hope this helps

UserImage.jpg
Chin Kai

Managed to get it working. Thanks!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.