Skip to main content
Nintex Community Menu Bar
Question

File Upload Type

  • July 9, 2024
  • 7 replies
  • 20 views

Forum|alt.badge.img+8

Is there a way to limit the type of file a user can upload?  I only want PDF files to be allowed…

This topic has been closed for replies.

7 replies

Forum|alt.badge.img+17
  • Nintex Employee
  • 3766 replies
  • July 9, 2024

Maybe a validation rule on the “Content Type” field of the attachment object? 


Forum|alt.badge.img+11

If memory serves, workflow rules don’t support attachments.  You will probably need Apex here.

Here’s a nice example to get you started: 

http://blog.prasannadeshpande.com/2013/10/salesforce-trigger-on-attachment/.


Forum|alt.badge.img+20

hmmm… this is apex. Since this is the case, can we put together something more meaty using a visualforce page with a skuid:page visualforce component for all things related to attachments. ie. require an description upon uploading.

Shooting from the hip on this one.


Forum|alt.badge.img+4
  • 40 replies
  • July 9, 2024

Curious if anyone got a solution working here…and whether you did it with attachments to the object or the lookup field (to the custom skuid file object).


Forum|alt.badge.img+14
  • 548 replies
  • July 9, 2024

Has anyone come up with a solution for this one?


Forum|alt.badge.img+17

Maybe this would help: Help And Training Community


Forum|alt.badge.img+5
  • 54 replies
  • July 9, 2024

I have posted something like this before. 

A solution is Javascript. This prevents the user from picking other filetypes than specified. But this is not foolproof since JS could be disabled in the browser.

$('INPUT[type="file"]').change(function (event) {<br> var ext = this.value.match(/.(.+)$/)[1]; switch (ext) { case 'pdf': break; default: alert('This Filetype is not supported.'); this.value = ''; window.stop(); } });