limiting the number of images you can upload - fine-uploader

UPDATED QUESTION
OK new idea.
.on('deleteComplete', function(event, id, fileName, responseJSON) {
}
how can I call the sessionRequestComplete function. I think this might "refresh" the array and solve this issue.
Matt
I am trying to limit the number of images a person can upload.
I also need to include the ability to have the orginal file plus two scaled images.
When I tired to use the
validation: {
itemLimit:6
}
option I needed to triple the number of items since I was have the system upload three images.
I got this all to work but the issue I am having is if I delete an image and then add a new image and to this a couple of times, the system will then alert me that I have exceeded the itemlimit.
is there a way to "refresh" the items in the current session of the uploader in the deleteComplete function.
thanks.
Matt

The itemLimit validation rule is quite literal. You'll need to keep this in mind when you determine a proper number. if you are using it with scaled image generation turned on.
If you are looking to adjust this value dynamically, or expect it to work differently, please open up a feature request.

Related

Not enough images in validation set in AutoML when done automatically

I'm trying AutoML from GCP and I'm stuck at training: I get an error message saying there is not enough images having the "Italy" tag in the validation set. I have uploaded the images manually, and so I did not specify which image goes to which set (training, validation, test).
The weird thing is, "Italy" has more images than the other tags, so why is there a problem with it ? Can I fix it from the AutoML interface or do I really have to upload a CSV to fix the bug ?
I already tried to add some new images with the "Italy" tag and it didn't change, I still get "0" in validation...
If it helps, an image can have multiple tags (in my example: one sport + one country).
You can resolve that issue by manually reassigning some images to the VALIDATE dataset, see this answer.

CEWP to show images (HTML) works until I use grouping. Then I see the DIV tag

I'm fairly new to Share Point so forgive me if this is to easy for you guys, but I could not seem to find the answer anywhere and I am rather stumped.
I am currently trying to make a website to track if particular tasks go over their due date. I have a calculated column that leaves a DIV tag to the image of a red/yellow/green circle which is displayed by the javascript for a Content Editor Web Part (CEWP) made by Christophe on his site here:
http://blog.pathtosharepoint.com/2008/09/01/using-calculated-columns-to-write-html/
I was able to put his code into the CEWP and everything looks great when it is in a standard list.
But I want a web part version of this on the homepage for easy view. When I make the web part (of a view grouping by the image tag) and place on the main site all I see is the DIV tag! I made sure to put an identical CEWP on the homepage as well but i get as grouping:
+[columnName] : DIV>img title=blahblahblah>/DIV> (2)
Needles to say when I expand this it stays the same for all entries below
Any Ideas?
Thanks for your time :D
Nobody has responded, but I found the answer so hopefully this will save someone the hours of grief I had. This will seem ridiculous but just go with it.
In the calculated column instead of returning the type as text, return it as a currency. Sounds ridiculous BUT IT WORKS!!

Thumbnail different from actual image

Here is a scenerio, on my products page I want to add an image of the product dimensions but for this image I want to use thumbnail which is different from the actual image which will say Dimensions. This will be applied to all the products across the store. So there will be one thumnail image for all the products that will be associated with it’s dimensional image. I want to show it on the gallery page as last image.
Any help would be greatly appreciated.
Regards,
Avian
If I'm understanding you correctly, you just want every product to have a thumbnail that can be set to be one of several images.
You will need to create a custom attribute for your products, and then programmatically set your current inventory to your defaults. (Or manually change them) There is a knowledgebase article that will assist you with custom options (if applicable), or another article I found via Google to assist in custom attributes.
It's likely not the best way of doing it, but an example of the JavaScript method I was talking about is simply to add the following into a JS file on your server.
document.observe("dom:loaded", function() {
$$('.catalog-product-view .image-thumb:last img').each(function(item){item.src = 'http://domain.com/path/to/image.jpg'});
}

Prevent Image Caching in MVC 2 C#

I have a profile image upload page, where users can overwrite their previous profile picture.
But when I return the users to their profile page the browser has cached their previous image and only an F5 refresh returns the new image.
Is it possible to prevent the browser from caching the image, as some users might think their new upload failed.
Ideally I would want to only prevent the image from being cached. But a quick look at donut-caching seems to suggest its not possible to do in MVC2...??
Thanks for any pointers.
Preventing caching is a very bad idea. Rather, consider using technique with explicit "version":
http://www.example.com/users/johndoe/avatar.jpg?43567
Just increment this number every time an avatar is saved and you're good to go. Or, instead of having an explicit version, you can use value of UpdatedOn date/time column (if you have one) converted to ToFileTime().

Facebook Game Function, Optimizin a Call, and Loading Bar

I am attempting to make a Facebook game and trying to replicate a common function that I usually find in many other Facebook game (a call to my website and illusionary image that is a loading bar).
The function should do the following:
User clicks on Button
Animated Gif Appears (Loading Bar)
Button Update User's Status
Animated Gif Disappears
Facebook Canvas page is updated
The code I currently have can be found at <dead link>
I am having trouble thinking of Step 2 and 4.
I need to optimize Step 5.
To clarify what happens on Step 5. I have Box 1 which has my stats. And Box 2 which has my points. I click on Box 1. This should update Box 1 with 1 points, and update Box 2; minus a point. (Clicking on Box 1, concurrently update both boxes)
I have successfully done this, but it is quite slow. I was wondering if there are alternative way that may be faster than what I am currently doing.
Script Updated with Mark-up. <dead link>
I've found a quick way to optimize the call. Rather than querying for data that I already have query, I will be using the first query to grab most of my data rather than querying it when I update.
It would help greatly to see the document markup (XHTML) where you have your elements and the calls to your javascript functions.
For steps 2 and 4 I recommend using the visibility attribute rather than display, or having the loading bar in an fb:js-string and using elem.setInnerFbml when you begin loading and once you have your response data, simply update it to the new content (you don't need an explicit loading_finish function in this case).
In your get_skillpoint function, you set parameters in an object and then you specify the action parameter again in the URL you are posting to as a URL query param - you may end up with one value overwriting the other, depending on how you access these values on the server side. I would recommend using different names for these two parameters if they are not the same. Also, why are you trying to send separate GET and POST variable sets? You should put everything in the POST and simply leave out the URL query string. I vaguely remember losing data that way in the past (vaguely, mind you).
If you can post your markup I'll update my answer with any light it sheds on the problem. It might be slow simply because Facebook isn't blinding fast when it comes to FBJS and AJAX. Also, FBML being returned must be preprocessed in the FB proxy before your app gets it, which adds a bit of lag; it's a bit faster to return JSON and just pull the data needed out of it, then place the appropriate pieces into an existing element or make use of fb:js-string.

Resources