Freeform File Upload: Permissions problem? 
Posted: 15 April 2008 08:09 AM   [ Ignore ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Hi!
I’m building a small upload utility for clients to send in images along with other information about their organization.
I’m making them register first. After they register as “members” on the site, they are redirected back to the form again, but see the {if logged_in} content with the registration form.
I’m able to successfully submit the form (along with an image) as a super-admin and also logged in as another member.  But my tester members aren’t able to get the file_upload portion to work correctly and see a “You are not authorized to perform this action” message when they hit submit.

Here’s the Form tag I’m using:
{exp:freeform:form form_name="global_calendar_2009" return="globalcalendar2009/thanks_response" required="company_name|image_title|country|company_name|industry|company_zone" file_upload ="Main Upload Directory"}

Here’s the Image upload input tag:
<input type="hidden" name="upload_field" value="image_upload" /> <input type="file" name="file1" id="file1" size="20" />

<span style="color:#999;">(Accepted format: JPG only.  Max file size: 20MB)</span>

Screen shot included of Upload Preferences screen.
Screen shot included for Directory Info for the uploads directory (it’s set to 777).

Any ideas?
Thanks so much!

Image Attachments
Picture 2.pngPicture 3.png
Profile
 
 
Posted: 16 April 2008 06:28 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

This feature respects your EE settings....

Are you sure your File Upload settings allow that member group to upload files?

CP Home › Admin › Website Administration › File Upload Preferences › Edit File Upload Preferences

(at the bottom of the page)

Can you have them try submitting the form WITHOUT the file upload code in place? (as a regular submission)

I’d also like to see what your full template code looks like smile

 Signature 
Profile
 
 
Posted: 16 April 2008 07:44 AM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Pie Man, thanks for responding!  You’re a big help on tons of these forum posts.
Here’s a screen shot of my member upload preferences.  (attaching now).
I have also attached my template code for the file upload.
One weird thing I did notice: I deleted one of my “tester” members, then had him register again and go through the registration and submission process and it worked GREAT.
Also note: I contacted my Engine Hosting folks to bump up the file upload size for PHP to handle.... and bumped up the max file size field on EE control panel.
How can I paste in my template code?  It’s too long… ack! I tried to attach txt and html files, and those are blocked as well.

Image Attachments
Picture 1.png
Profile
 
 
Posted: 16 April 2008 07:52 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

No problem bensmithson smile

Don’t worry about the template code for now wink

What happens when you try submitting the form WITHOUT the file upload code in place?

 Signature 
Profile
 
 
Posted: 16 April 2008 08:00 AM   [ Ignore ]   [ # 4 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Without the file upload code in place, it works great and submits to the freeform.

Image Attachments
Picture 2.png
Profile
 
 
Posted: 17 April 2008 07:32 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

Does it work for uploading ver small files? smile

 Signature 
Profile
 
 
Posted: 17 April 2008 07:59 AM   [ Ignore ]   [ # 6 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

I registered as a new member and it worked great.  http://siemens.pmhclients.com/images/uploads/leaves_one_color1.jpg (534 KB, not exactly “small” wink)
Maybe there some member “artifacts” or settings tied to member data somewhere that are not playing nice with the form?

Profile
 
 
Posted: 23 April 2008 07:26 AM   [ Ignore ]   [ # 7 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Ok, so I’m still stuck and I cannot figure this out for the life of me.
1st time submitted: a MIME type error.
2nd time submitted: you are not authorized to perform this action.

I checked member settings - they are able to upload image.  Also, my main upload directory info is set to 777.

Any ideas, or should I drop back and punt?

Image Attachments
Picture 1.pngPicture 2.png
Profile
 
 
Posted: 23 April 2008 07:28 AM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3343
Joined  2006-10-18

I can assume you’ve set “jpg” as an acceptable file for uploading?

Otherwise, I’ll have Mitchell take a stop by…

Thank you for your patience. wink

 Signature 
Profile
 
 
Posted: 23 April 2008 07:33 AM   [ Ignore ]   [ # 9 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Here’s a screen shot of the File Upload Preferences. Thanks for your continued support!!!

Image Attachments
Picture 3.png
Profile
 
 
Posted: 01 May 2008 06:26 AM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Ben,

If you click the back button to return to a form that you have submitted, you will get a message like, “You are not authorized to perform this action.” That’s a security feature. You can also get that message if you have been blacklisted, if your IP address is anonymous or if you trigger any number of other native EE security settings.

The MIME type issue might be as simple as a corrupted image file or a file extension of an incorrect case, uppercase / lowercase.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 01 May 2008 07:08 AM   [ Ignore ]   [ # 11 ]
Newbie
Rank
Total Posts:  9
Joined  2008-02-20

Mitchell, thanks for the reply!  I’m good to go!

Profile