Dropzone.js Don't Show Result After Upload - model-view-controller

Im trying to upload multiple files by dropzone.js in my MVC Project. The files upload successfully but the problem: after upload files, the page reset and i cant see the results. I have almost searched all the related subjects in this site and the other examples. I see people want to learn how they can refresh page :) but i want to stop page after upload. The results preview disappear quickly. Thanks for any help.

After hours, i see its not about dropzone, its about mvc. Because of post data in mvc, if you save a file, modelstate change, then automatically redirect the previous action/view and the results disappear. So it seems like a page refresh. Anyway, its suggested to use PRG instead of POST. Or redirect another GET action after successfully upload.

Related

How to keep page editable during file uploads (Laravel)?

I work on a Saas project where users can submit/upload items.
I want to create a similar work-flow like Youtube.
This means that the user uploads image file, ZIP files etc. which then show in the upload progress block, during this time I want the user to be able to edit the other informations like tags, text description, price for item etc.
At Youtube a user can upload a video file and edit all other things during the upload, he can even leave the page and the upload continues in the background.
But in my project whenever a user uploads a file these fields can not be edited properly or get removed again after the upload is successful.
Please point me to a solution how this works/how Youtube et al approached this.
Thanks.
I think you should do this with javascript features
Like sending a file with ajax in laravel and php.
By doing this, you can still access the elements inside your web page.

profile picture upload laravel & foundation framework

I have a registration form completed and would like to add a profile picture upload. Once the user clicks the browse, he can select the photo. Then he clicks ok/apply/ok and then the photo is reflected in the thumbnail area without page refreshing.
Once the user is happy with all fields input he can submit the form and with it the photo of course.
Anything that does this exists out there already? If not, please provide guidance on how to establish this feature.
Thanks,
I'm not aware of a ready made solution for this but there probably is something :-)
However, with Laravel this is beautifully simple. You've tagged your question ajax but I'll answer this assuming you're going to use an old fashioned server round trip (i.e a form submit).
1) In your template, add a file element to the form. http://laravel.com/docs/html#file-input
2) Add some javascript to the page that detects when a file is selected and shows the preview. Extensive tutorial here: http://www.html5rocks.com/en/tutorials/file/dndfiles/
3) In your controller, handle the file using the Input facade. http://laravel.com/docs/requests#files

How to make the Wordpress admin-bar work with AJAX loading

I'm working on a website that uses html5's push- and popstate in combination with ajax-calls to create a website that dynamically loads in Wordpress posts and pages, without causing a page refresh.
I've got that working fine, but I would love it if the black Wordpress toolbar/adminbar that shows at the top of the site when you're logged in as an admin, also reflected the change of content. Is there any way at all to make this happen? So that when I go from a post to page, for example, the "edit" link in the admin bar updates.
I don't think it's as easy as I hope it is, and if it can't be worked out I think I'll just disable the adminbar on the front-end. But it could be that I'm missing something.
Thanks in advance!
I'm working on this myself. I'm gonna build an ajax action and jquery function to do this. I will post here when it's done. For NOW i've instructed my users to just refresh to get the edit link. if you're using HTML5 history then you're on the permalink you want anyways. refresh and let the server regenerate the bar. not perfect but not terrible.
another option is to put edit post links in your template.

upload on page image in codeigniter

How to upload image on page using ajax in codeigniter? On form image needs to be uploaded then
user should fill further information. I try ajax but unable to figure out simplest way
http://net.tutsplus.com/tutorials/javascript-ajax/how-to-upload-files-with-codeigniter-and-ajax/
This is how I did it for the first time, easier than it might look and should work without too much problems.

Google Docs spreadsheet form / permissions

I have a Google Doc spreadsheet, which I created a native Form for. I copied the form code, and integrated it into my own page here.
This form was working until I gave the website owner permission to view the spreadsheet.
Since then, when we hit submit, it takes us to the native form page, and does not insert form data into the spreadsheet. (You're welcome to test the form.)
Should providing viewing permissions to the spreadsheet break my own version of the form?
Did you set permissions via docs.google.com? If so then no it should not have changed anything. I got all the way through the form to "Attending
Your response has been recorded." Is this what you are getting as well or do you have a backend error?
If it is not a backend error and I was able to get somewhere you couldt I would suggest clearing your browser chache and possibly resetting your router as sometimes they hold a cache of older versions of a website.
Did the current form of yours manage to work this before? I mean. It is shown that in the native form the questions are text boxes. While in your GUI form, it had radio buttons and check boxes, since you are calling the native post back url?

Resources