Jump to content

Issues with Upload helper


GriefCode

Recommended Posts

Posted

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.

Posted
9 hours ago, sweethoney said:

i kno im trying to help you i seen somthing that you want im looking 4 it

how about a download page tutorial an than you can work it from there

I do not think that this will help me. I'm creating an own application not adding a page.

Posted

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.

Posted
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.

Archived

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

  • Recently Browsing   0 members

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