Skip to Content Skip to Menu

Uploading a csv with the wrong extension is just ignored

  • Ake2017
  • Ake2017
  • OFFLINE
  • Posts: 57
  • Thanks: 1
  • Karma: 0
3 years 8 months ago #323895 by Ake2017
I tried to upload new member data through a csv-file that was incorrectly named .txt.
Then the upload is just ignored.
A more appropriate response would be "The upload file does not have the extension .csv. The upload request has been ignored."
(As long as the contents are acceptable you might consider allowing also the .txt extension).

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
3 years 8 months ago #323925 by krileon
What do you mean it's just ignored. File fields just check mimetype and extension. It's not going to open the file and try to determine what the file is.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Ake2017
  • Ake2017
  • OFFLINE
  • Posts: 57
  • Thanks: 1
  • Karma: 0
3 years 8 months ago - 3 years 8 months ago #323947 by Ake2017
I meant that "A more appropriate response would be "The upload file does not have the extension .csv. The upload request has been ignored.""
That is - Don´t just ignore it, let the user know what the problem is.
Last edit: 3 years 8 months ago by Ake2017.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
3 years 8 months ago #323976 by krileon
How is it supposed to know the .txt should be a .csv. By default .txt files are allowed to be uploaded so it's a perfectly valid upload. Everything is working as it should. If you don't want .txt files uploaded then adjust your file field parameters. If the file doesn't have a valid extension for the file field it will throw a validation error for that field.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • Ake2017
  • Ake2017
  • OFFLINE
  • Posts: 57
  • Thanks: 1
  • Karma: 0
3 years 8 months ago #323989 by Ake2017
You don't seem to understand the issue.

When I write "Then the upload is just ignored. "A more appropriate response would be "The upload file does not have the extension .csv. The upload request has been ignored."", that is what I mean.

If you chose to ignore the upload when the extension is wrong - that's your call (or the programmer's), no objections there. (There are more flexible solutions around, but whether they are appropriate to use here, I don't know)

But what I humbly suggest is that when you ignore a user task, you should not JUST ignore it, you should ALSO tell the user what you did and feed back clues as to what happened and why and how to avoid it.

Simply so.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48603
  • Thanks: 8300
  • Karma: 1445
3 years 8 months ago #324005 by krileon
The upload isn't supposed to be ignored if the extension is not allowed. It's supposed to throw a validation error. They shouldn't even be able to submit the form if the extension is not allowed. For File fields .txt is a default allowed extension so it should just upload fine. It's not going to know the file is supposed to be a csv when it's a txt and tell them that; that's not possible. The below is what they should see attempting to upload an extension that isn't allowed.



I've no idea what you're even talking about at this point. A file field? CB Gallery? Please be more specific.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum