Upload functionality does not work

Windows 10
Loca IIS
aspx

Hello friends,
I’m trying to implement the ‘upload’ functionality but when I click on the corresponding button, nothing happens, that is, the file is not ‘transported’ to the folder.
I followed the tutorial from this link: Uploading Single File To Your Server, remembering that my version of Wappler is the latest. I also checked this link: Uploading Single File for a possible solution. Unfortunately it didn’t work for me.
Finally, when I click the button I get this message:
image
Any help will be appreciated!
Thanks.

So that you can compare, this is what the code for the form should look like

<form id="form1" is="dmx-serverconnect-form" method="post" action="dmxConnect/api/upload.php">
    <input id="file1" name="file1" type="file" class="form-control mb-3">
    <button id="btn1" class="btn btn-success" type="submit">Upload</button>
</form>

The Server Action should be similar to:

Hi Ben, thanks for the reply!
Well, it seems to me that the ‘things’ are in their place: see the images, please.
MyForm

Another thing, I noticed that there are two ways to do the same thing (Globlas and API). It makes sense? Are they different or redundant?


Additionally, is there a way to DEBUG using the Wappler IDE? I need to know how the JSON is being generated! Can I do something like TRACE? Any other suggestion?
Thanks again.
Fernando.

Globals are mainly used to setup certain things like database connections but you can also have global variables

API actions are actions you can execute for things like form uploads and retrieving data with server connect

Go to the site’s API folder and open the file in Notepad

Ben,
My file (aspx): something is missing?

Thank You Sorry-Duh!

They aren’t the same. Globals will execute on EVERY API file call (before the API actions) - adding steps here can be really useful but can easily add unnecessary DB calls/overhead to your API actions.

Thank You Bpj!

1 Like

I do not see a problem with what you have shown.

1 Like

Hello friends,
Is there anyone here in the community who has implemented the “upload” functionality using aspx with IIS and has had success? If yes, show me how!
I’ve been trying for three days, investigating and I can’t overcome this situation, I’ve even created a project in php and nothing has happened! I need someone to tell me if the problem is with something I miss or if this seemingly simple task is really that difficult!
Thanks.

Just something else that I didn’t see mentioned here is perhaps your file you are trying to upload is bigger than your server allows?

Have you tried with different file sizes?

1 Like

Thanks Brad for the help. His question is pertinent and I also verified this hypothesis. That’s not what it was about!
After I made this last post (already a little “disappointed” :slight_smile: ), I decided to change the folder where I was supposed to save the files. It was then that I discovered that the user did not have permission to create the folder. Using “Dev Tools” I could conclude that the user could not write to the previous folder either. Conclusion: no permission!
But it should be noted that the only message I received was when I tried to create a new folder. When I tried to “write” to the folder that already existed, no message was sent to me.
I want to thank everyone who was willing to help: @ben, @Sorry_Duh, @bpj, @brad.

1 Like

There are many things you need to setup if you are running IIS and want to perform file upload. Things like giving upload permissions to IIS to the upload folder, allowing larger file uploads. You should consult the IIS documentation about this

Also if you then upload eventually your site to remote IIS you need to perform the same setup there as well.

So it is a lot of setup work on IIS and asp.net - so unless you really must use IIS I would suggest to pick more easier and out of the box setup for Wappler like NodeJS that has its own server and runs out of the box.

1 Like

Thanks @George for your help. I must say that the situation has already been resolved!
As for using IIS, I’m quite comfortable with it. Let it be said that IIS is so generous that it even runs PHP :slight_smile: :slight_smile:
I would like to take this opportunity to wish you success in the presence of the Team here in Lisbon at the web summit! Unfortunately, I won’t be able to attend but I can leave my address to receive the T-shirt! :slight_smile:
A hug.

1 Like