Is it possible to prevent uploadify from uploading multiple files asynchronously? Ideally, I would like it to have auto set to true, and it works from the first file to the last one by one.
I am running into an issue where I am storing files in the Sitecore media library and it is creating duplicate paths to the files instead of putting both the files under one path.
I've tried adding 'async': false to the config I pass into the call to uploadify, but no dice there (didn't expect that to work).
I've look on the uploadify forum and there doesn't appear to be an answer there. Any help or ideas would be appreciated.
So although I could not find a way to make it not upload asynchronously, I did find that you can limit the number of files uploadify can upload simultaneously using this setting: simUploadLimit. So all I did was set that to one, and that resolved my issue.
Related
Hanging around this problem from quite a few days..
I have an angular 5 application, I am using some js files which are present in src/assets/js/*.js of my angular app's project directory. Since to achieve good performance, i am using lazy loading technique for loading of these js files.
I have a script.service.ts file in the app folder which loads the js files, i provide the names of the js files to this service to make it load. I also have a script.store.ts file where i have mapping of the js file names with there paths. Script.service.ts uses this path to load the js file with the mentioned name.
Problem - Now, whenever i change something in my js file and deploy the application, the changes are not getting reflected in the browser since the files are already cached. I have used gulp plugin to append a hash content to these file names with task runner, but i cannot make changes in the code of script.store.ts every time, since the content hash is unique for each file..
I am searching for a solution where i can achieve cache busting having incorporated this lazy loading feature of js files..
I hope i will get the solution soon. Thanks in Advance.
I am confused on how to do this.. Currently I am implementing an automatic download using Javascript:
target.appendJavaScript("location.href='"+ "./Access.xls" + "';");
This doesn't work.. What is the proper way to trigger an automatic download and how do I properly set the url? I am not too familiar with Javascript but trying to implement this. The file is in the root of the project.. but it tells me it is not found.
Also, when the user downloads it, I would like to then delete it right away after it is downloaded using Javascript, how can I do this? I am using Javascript because I am calling this file within an ajax method.
Thanks!
The best way to get access to that resource, you should use a ResourceReference as explained here. To get the url of a ResourceReference use:
RequestCycle#urlFor(ResourceReference, PageParameters)
However, I don't understand what you need regarding deletion of the file once downloaded. If your file is contained in the jar/war of your project, I don't believe it can be deleted from inside the web app. You could block access to it once it's downloaded however, if that makes sense. Not sure what you're trying to achieve here.
Using the jQuery wrapped version of Fineuploader v3.3.
Is it possible to populate the file list with files already in the upload folder?
I think "_addToList(id, name)" should do the trick, but I can't get it to work. Any ideas?
Seems that they are currently working on this feature:
https://github.com/Widen/fine-uploader/issues/784
So, this will be available soon.
This is not a behavior that Fine Uploader currently supports. Fine Uploader only displays files that users have submitted to the uploader since the current uploader instance was created. It doesn't try to be an all-in-one web application. You could probably add your own item to the list/UI via javascript. That probably wouldn't be terribly difficult, but seems like an odd thing to do.
If you'd like to discuss your specific use case more, please open up a feature request in the Github issue tracker.
Generally, client side code cannot add stored or hard-coded path based file names for use in any type of POST or upload operation. Obviously this is a security measure, you can imagine if a malicious web page could add to a generic POST operation some type of baked in file name. So from what I understand, only the user can specify path based file names, via a file browser for the session that it is included in. This applies to HTML/JavaScript/jQuery but am unsure if Flash/Silverlight based solutions would also be limited. I think a Java based uploader would be free of this. But you are just moving closer and closer to installed software.
From all I have read in Stackoverflow and Google, it seems that once again I am forced to work around IE. Since it doesn't support multi, I am forced to use Uploadify or some other 3rd party pluggin. Thanks Microsoft..
I want to verify that there is no way to automatically batch multi-select files into one MVC controller call using Uploadify. I think there are ways whereby a user can add files, then press a button to upload the files, but is this it??? What pluggin will allow a user to select 4 files, close the file browse dialog, then automatically send all of the files in one http post?????
thanks
You can check the documentation of uploadify, it can select multiple files using multi option.
You can also upload after all the files are queued using auto:false option.
Here is what you can upload after queuing
I'ld like to prevent direct-linking to .zip files I offer for download on my website.
I'm reading posts for hours now but I'm not sure which method is the best to achieve that. PHP seems not to be safe and htaccess refferer can be empty etc.
Which method do you guys use or would suggest?
Cheers
See: http://www.alistapart.com/articles/hotlinking/
and: http://www.webmasterworld.com/forum92/2787.htm
Referrer checking is one option, but as you noted they can be empty or spoofed.
Another possibility is to set a cookie when someone visits normal pages on your site, and check for that when the person tries to download the zip file. This could be gotten around (e.g. by the hot-linker embedding an appropriate cookie-setter page as a 1x1 image along size the hot link), but it's less likely they'll figure it out. It'll also exclude people who block cookies, of course.
Another possibility is to generate limited-time-access URLs on the download page, something along the lines of http://example.com/download.php?file=file.zip&code=some-random-string-here. The link would only be usable for a small number of downloads and/or a short period of time, after which it would no longer function.