Dani3lSun / apex-plugin-dropzone

Oracle APEX Region Plugin - Dropzone
MIT License
72 stars 19 forks source link

Insert files in custom table #41

Closed dpccrt87 closed 6 years ago

dpccrt87 commented 6 years ago

I want to upload multiples PDF files in my own and custom table using DropZone APEX Plugin. So for that, i created another version, following your article https://github.com/Dani3lSun/apex-plugin-dropzone#inserting-uploaded-files-into-your-own-tables and using my own table 'TSL_CC_PIECES'

But the issue still here, i cant store the files in my custom table.

The demonstration of issue, on apex.oracle.com with this credentials: Workspace: ws_formation Username: asoukaina Password: s@boulah123

I used the Application 200218 - Dropzone Demo.

Thank you a lot for help.

NB: APEX version (5.1) Used web server / version and platform (ORDS 3.0.3 / Tomcat 9 / win7 x64) web browser / version and platform (Chrome ,Firefox )

Dani3lSun commented 6 years ago

Hi @dpccrt87 I just checked your code and saw that you use "Custom Table", but if all files are inserted you loop over the collection. Thus you´re using custom table the collection is empty and does not exist.

I changed the plugin setting to use the APEX Collection, now the insert is executed. But it seems that a required column is not set. I don´t know your data model but just set all required columns in the "Store Data" Dynamic Action PL/SQL Code and you should be fine...

screen shot 2018-02-20 at 16 18 50
dpccrt87 commented 6 years ago

Where did you did theses modifications ? You can retest (now, i set this column nullable).

In my case i want to insert files in custom table TSL_CC_PIECES, for that i did: setting storedata

Dani3lSun commented 6 years ago

Yeah I know what you want to do, but you can´t choose as storage type "custom table" and then select the files of an APEX collection in the PL/SQL code. Thus you choose "custom table" the collection does not exist. So I changed this:

page_designer

36436603-a6c9982c-165c-11e8-9333-21d7d2834efa

dpccrt87 commented 6 years ago

You can see my application now, it works using both custom table and apex collection, and i dont know why it works