Trembowiecki
Active Member
Hi, it's a little embarassing, but I've been using Fabrik for years now... just not the file upload element. Now I have to upload image (just one per form), crop it and save it, so I can generate PDF with cropped photo. And this is where I start to struggle, because:
1) when I save and re-open the form, I can't see any thumbnails (yes, I enabled thumbnails). I have to click this little Icon, so in popup I can see again original image with cropping area. I've tried various combinations and nothing - no preview thumb,
2) I thought that maybe I'll be clever and display thumb with a help of calc emelemnt, but... var_dump shows me looong string, which looks like JSON, but in square parentheses. Sure, I can remove parentheses, decode JSON and work with the part where file name is, but... isn't it an overkill? I mean - there must be a better way to just get the name of uploaded image, right?
3) my error log fills pretty quick with entries:
And it doesn't matter whether I change 'Include server path' setting - I still get these warnings.
Also, when the popup opens and I drag the cropping area, I immediately get this error in console: Uncaught TypeError: Cannot read properties of undefined (reading 'contains').
1) when I save and re-open the form, I can't see any thumbnails (yes, I enabled thumbnails). I have to click this little Icon, so in popup I can see again original image with cropping area. I've tried various combinations and nothing - no preview thumb,
2) I thought that maybe I'll be clever and display thumb with a help of calc emelemnt, but... var_dump shows me looong string, which looks like JSON, but in square parentheses. Sure, I can remove parentheses, decode JSON and work with the part where file name is, but... isn't it an overkill? I mean - there must be a better way to just get the name of uploaded image, right?
3) my error log fills pretty quick with entries:
INI:
is_file(): open_basedir restriction in effect . File(/images/stories/image_name.jpg) is not within the allowed path(s)
Also, when the popup opens and I drag the cropping area, I immediately get this error in console: Uncaught TypeError: Cannot read properties of undefined (reading 'contains').