Import Files to Table

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.
Post Reply
lfernandes
User
Posts: 77

Import Files to Table

Post by lfernandes »

I am implementing the data import functionality from csv and xlsx files, however every attempt has had the same error message: Failed to upload TCPolos.csv: File type not allowed

What could I be doing wrong?


MichaelG
User
Posts: 1113

Post by MichaelG »

Check ASP.NET -> General Options -> File Upload -> Allowed file types.


lfernandes
User
Posts: 77

Post by lfernandes »

I understood your orientation and adjusted the configuration setting, this way I was able to complete the upload, but at the end it occurred Server Error 500: Internal server error.
I'm trying to upload the csv file with data extracted from the system table itself
How to debug this functionality, I can't identify where it is or was it wrong?


MichaelG
User
Posts: 1113

Post by MichaelG »

Try enabling debug mode (Tools -> Advanced Settings -> Debug), and press F12 to see the network response for the import processing.


lfernandes
User
Posts: 77

Post by lfernandes »

This is an error that is occurring. Any idea what could be wrong and how to fix it?

jquery-3.6.0.min.js:2 POST http://localhost:9011/tcpoloslist 500 (Internal Server Error)
send	@	jquery-3.6.0.min.js:2
ajax	@	jquery-3.6.0.min.js:2
(anonymous)	@	ew.js:6957
done	@	ew.js:7007
_trigger	@	jquery.ui.widget.min.js:1
_onDone	@	..\..\..\jQuery-File…y.fileupload.js:966
...

MichaelG
User
Posts: 1113

Post by MichaelG »

Enable debug mode (Tools -> Advanced Settings -> Debug), press F12 -> Network and check the network response from the import.


lfernandes
User
Posts: 77

Post by lfernandes »

POST http://localhost:9011/api/upload 401 (Unauthorized)


MichaelG
User
Posts: 1113

Post by MichaelG »

The upload has failed due to no permission. Please make sure that you have logged in first. Also make sure that the logged in user has the permission to import file.


Post Reply