Welcome to the nuBuilder Forums!

Register and log in to access exclusive forums and content available only to registered users.

Upload files / images

Questions related to using nuBuilder Forte.
Post Reply
olaf
Posts: 6
Joined: Thu May 18, 2023 8:33 am

Upload files / images

Unread post by olaf »

Hello,

I need to upload files (PDF, ...) and images (jpg, png -> user photos) to a (media) folder on my server - or to the database.

How can I do this?

The "standard" file and image object do not seem to be helpful...

The uploaded files should be available for download from a form, the images should be displayed within a form.

Maybe someone has already implemented this?

THANK YOU!!!

Best,

Olaf
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Upload files / images

Unread post by kev1n »

Hi Olaf,

In order to upload files, you can use an object with the Type "Input" and Input Type "File".

To display the files, you have two options. First, you can use PHP to fetch the images/files from the database and exhibit them using JS/HTML. Alternatively, you can explore third-party libraries that cater to your specific requirements.
olaf
Posts: 6
Joined: Thu May 18, 2023 8:33 am

Re: Upload files / images

Unread post by olaf »

kev1n,

thank you very much for your reply!!!

I had experimented with the object Input/File - but files must be under 300 KB, right?

I would like to upload bigger files…

But maybe I did something wrong.

Will try again this evening and post a reply…

Again, thank you very much!!!

Best,

Olaf
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Upload files / images

Unread post by kev1n »

Choose Target "File System" to upload files with any size.
olaf
Posts: 6
Joined: Thu May 18, 2023 8:33 am

Re: Upload files / images

Unread post by olaf »

kev1n, thx again…

I am quite sure I had tried thus but will give it another try this evening.

Great support, thank you!
stevenmiller
Posts: 25
Joined: Mon Jul 06, 2020 4:23 pm
Has thanked: 3 times

Re: Upload files / images

Unread post by stevenmiller »

I have a question regarding to this post:

So I followed these instructions and I still can't figure this out. How do I store path to the picture that i plan to store in FileSytem in the database field?
And how to load pictures from FileSystem through those paths to show on the frontend for each project id.

I feel pretty confused how to do this, even tho I tired.
kev1n
nuBuilder Team
Posts: 4292
Joined: Sun Oct 14, 2018 6:43 pm
Has thanked: 71 times
Been thanked: 444 times
Contact:

Re: Upload files / images

Unread post by kev1n »

Hi,

Does this help? viewtopic.php?p=27635
Janusz
nuBuilder Team
Posts: 506
Joined: Fri Dec 28, 2018 1:41 pm
Location: Krakow, Poland
Has thanked: 8 times
Been thanked: 18 times

Re: Upload files / images

Unread post by Janusz »

Hi,
In my case I use th XMLHttpRequest to upload files. Here short YouTube movie to present the way I do it:
Files upload
If you like nuBuilder, please leave a review on SourceForge
Post Reply