Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Form Problem DropZone

form

Started by Bartek 11 months ago · 3 replies · 484 views
11 months ago

Hi everyone,

I'm running into an issue when trying to use Form in my project. I'm trying to load the file from md with dropzone.

When I run it in the browser, I get the following error:

TXT
Uncaught SyntaxError: Unexpected token '/'

The site was working fine before the update. I suspect it might be related to changes in how Grav handles assets or JavaScript modules.
Could anyone help me fix this or suggest a workaround?

Thanks in advance!

dropzone.md|690x338

dropzone|690x101

dropzone 2|369x64

11 months ago

@pawlikbartlomiej, For me, the information you've provided is a tad too little... Could you elaborate a bit more on:

  • What are you trying to achieve?
  • Are you talking about a form in frontend of backend (Admin)?
    • Frontend: The Form plugin has its own File field that allows you to download a file into the folder of the page.
    • Backend: There already is a download option in the page editor to download a file.
  • I have no idea what information the screenshot is showing (and please don't use screenshots...)
  • Why are you using nodejs to create a Form page to download a file?
  • Etc...

You might want to read /forum/general/the-art-of-asking-great-questions-t8554 to improve your question.

11 months ago

Based on the name sortable, I assume it's not about the file field, but rather about drag'n'drop DOM manipulation

11 months ago

Yes, exactly — it’s about the field where the user uploads files.
The problem is with Dropzone initialization.

On my local environment, everything works fine, but on production I get this error:

TXT
Uncaught SyntaxError: Unexpected token '/'

This all started happening after updating Grav to the new version; previously, updates didn’t cause any issues with this.

Suggested topics

Topic Participants Replies Views Activity
Support · by Marcel, 4 days ago
0 81 4 days ago
Support · by JakobDB, 6 days ago
1 89 5 days ago
Support · by ramenos, 7 days ago
3 103 6 days ago
Support · by gravinator, 2 weeks ago
3 228 7 days ago
Support · by Roger Parkinson, 2 weeks ago
3 308 2 weeks ago