-
Notifications
You must be signed in to change notification settings - Fork 627
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bombs on activity image upload if no file selected #48
Comments
For me this is breaking whether or not a file is selected. I think it's because there is no I'll take a look at this, unless it isn't needed for the November MVP and other things should be prioritized? |
This upload form is using Rather than use This will allow the Let me know if you think this is the wrong approach; if it sounds sensible I'll start working on it. |
I think I have this basically working now, having converted the create/edit/activity image upload page to use two different ViewModels rather than the simply the It's successfully uploading images to Azure. I'll test everything more thoroughly tomorrow morning and push it for review. |
This problem also exists for the Campaign Admin Edit page: it too crashes when no file is selected. The issue is as described above. @dpaquette, what would you suggest as the best way for fixing this? If your refactorings of all the admin pages is now complete, the solution I committed last week could perhaps be reimplemented on top of those modifications (i.e., we could have two models, one for each form, which would allow validation on the image form). Alternatively, the |
Touch base with @joelhulen. I think he was doing something related to images. Just want to make sure you 2 are not overlapping on tasks. |
Yes, that's true. I wasn't finished with the changes since I was rushing to On Monday, November 9, 2015, David Paquette notifications@github.com
|
Ah okay, I'll leave it for now if you're doing stuff on this @joelhulen. I hope my PR #301 didn't overlap with anything image-related you were doing. My main question for the above, which maybe of interest for whoever ends up working on it, concerns the design decision of whether to split the viewmodel so that the file upload form can be validated in the normal way, or whether to simply do the error checking on the post action and then redirect to the original edit page indicating some kind of error via the querystring. |
@joelhulen are your changes with respect to images complete now? Shall I go ahead and fix up the activity edit page in a manner similar to how you simplified the campaign one, or are you handling this one too? |
@ksk100 yes, my changes with respect to images on the campaign edit page are complete. Please go ahead and follow a similar pattern for the activity edit page. I wouldn't be able to get to it until late tonight. One thing to look for is the issue you brought up about the image being required. If you fix that for activities, please also apply the fix to campaigns. |
Okay no problem.
|
One question: as it stands the Create Activity page doesn't show the image upload form; that only becomes accessible via the Edit page once the activity has been created. Was there a reason for that behaviour and should it be retained? (Incidentally, as it's already getting late here I probably won't get this finished and tested tonight; but it'll be finished off first thing tomorrow, with the fix for the campaign page too; if that will be too late do take over). |
I don't know why it was set up that way, to be honest. If you mimic the image behavior I've set up in the Campaign edit form, then you'll be able to upload the image on create as well as edit. |
Okay will do.
|
On the Admin Edit Activity screen, if I load an activity with no image file and click the Upload button, the application throws a null reference exception. It should instead ignore or not allow an image upload with no file selected.
The text was updated successfully, but these errors were encountered: