Jump to content

Issues with Upload helper


GriefCode

Recommended Posts

Hey,

I tried to create a form with an upload section, for this i followed this documentation:

So my upload form element looks like this:
https://github.com/gamershost/Forum-Report-Archive/blob/master/modules/front/base/archive.php#L108

And my FileStorage like this:
https://github.com/gamershost/Forum-Report-Archive/blob/master/extensions/core/FileStorage/Report.php

 

However, when i upload a file, i'm gettings this response:
Unbenannt.PNG

I already chmodded my whole forum to avoid that this could cause the issue.

What did I miss here?

Thanks in advance.

Link to comment
Share on other sites

I wasn't able to install your application from the github repository ( your db schema is broken because the data columns can't have '' as default value )
 

The problem is your csrf check at the beginning of the add method.The uploader tries to send the uploaded image to this url, which returns then a 403 no permission error because of the missing csrf key.

 

It's really not needed here. The form class will validate the csrf key once the form was submitted.

Link to comment
Share on other sites

59 minutes ago, Daniel F said:

I wasn't able to install your application from the github repository ( your db schema is broken because the data columns can't have '' as default value )
 

The problem is your csrf check at the beginning of the add method.The uploader tries to send the uploaded image to this url, which returns then a 403 no permission error because of the missing csrf key.

 

It's really not needed here. The form class will validate the csrf key once the form was submitted.

Ah that is interesting, thanks, i didn't know that. I will try that once i'm home.

 

About the database, yes I had it also on my previous Application as well. I am not 100% sure how and why this sometimes happen, i use the schema creator of the developer center. Maybe some kind of check would be nice.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...