Upload file on ../ folder (outside site root folder)

Hi @Teodor

I’m experiencing a problem.
I have to upload files outside the folder where the application of wappler is done.

It means that i should upload file to folder: …/foldername . but it seems that upload components support only upload inside the folder where it is located the wappler website.

For better explanation:

site folder is in /public_html

The site app done in Wappler is located in

/public_html/atlante2

I have to upload file on

/public_html/hub2/files

It is really like that or just I’m doing something wrong?

You can try adding the entire path to the folder. I don’t think it will work but it’s worth a try.

You can only upload files to locations inside the root folder of your site.

1 Like

Thank you @Teodor,
I was supposing :frowning:

Just as curiosity, Move a File do not return new path of the file?

Solved @Teodor!!

Because Wappler is fantastic and limitless!!

and what was the solution :slight_smile: ? So other people can read and learn also :slight_smile:

Just to make clear situation:

I have /public_html folder with two websites in public_html/folder01 and public_html/folder2

website folder02 is dedicated to Commercial Representant and website folder 01 is for the management.

Don t ask me why I did two different folders and not a single integrated application. The two projects were just experimenting Wappler and were not intended to go in production but day by day I made the two website working with satisfaction of the users.

The problem: I m making a ticket system where salesmen can open ticket and upload their own files.
The files are uploaded on public_html/folder02/filestorage

IT was working fine but the problem was that people from the management cannot upload their own files in the reply of the ticket, because they should upload on …/folder02/filestorage but file upload do not support uploading in folder out of the website root.

Then before to delete lot of works I try last chance:

On site /folder01 security provider was set as folder01sec while on folder02 was set with folder02sec, different db table but same DB, totally independent.

Then I made a separate login page for management (people of folder01) in folder02, recreating the login file of folder01, same key,name and same tables.

so?

On website folder01 I put a link to the ticket management (done in folder02). User do not understand they switch from folder01 to folder02 and they can upload their files too in folder02/filestorage.

In this way once they login to folder01 website, once redirect on folder02 website they are already logged and no need to login again.

I m sorry for long explanation but I m with mobile, tomorrow will add screenshot.

So, if you recreate same security provider file once you login in one site automatically you are recognized in the second too.

For sure @George will say that this is a great collection of “worste practices” I m the first to say that.

but at the end it worked!