uploadify

Fixing django csrf error when using uploadify

▼魔方 西西 提交于 2019-12-07 22:59:54
问题 I'm using uploadify in my django admin but I'm getting a 403 error. When I use @csrf_exempt the error is gone but this is very risky. Is there a better way to fix this problem without compromising the admin page by using @csrf_exempt decorator? Thanks in advance 回答1: It sounds like either you or the original author of that package need to update it to work with the changes that have come through in the CSRF framework. Sorry that's not the easy answer... :/ You'll need to make sure the ajax

How to Send Data Cross Domain using postMessage?

允我心安 提交于 2019-12-07 06:15:47
问题 I have an uploadify script in an iFrame which is on another domain. I am attempting to send the file upload data to the page on which the iFrame is embedded on. I have the following code in a iFrame (uploadify script): $('#file_upload').uploadify({ //JS CODE 'onUploadSuccess' : function(file, data, response) { data //data is what must be passed from the iFrame to the script on another site } }); data is what must be passed to the following script on another domain: var myframe, nestedFrame;

Uploadify OnComplete to display Image and Image URL using asp.net

♀尐吖头ヾ 提交于 2019-12-07 02:16:27
I am trying to uplaod images to folder an then trying to show them as soon as they upload an I am able to display the image and not able to display it's URL simultaneously. But inividually I am able to display one another. Any help will be greatly appreciated Thanks in advance Here is my java script code: <script type="text/javascript"> $(window).load( function () { $("#Inputfile").fileUpload({ 'uploader': 'scripts/uploader.swf', 'cancelImg': 'images/cancel.png', 'buttonText': 'Browse Files', 'script': 'UploadVB.ashx', 'folder': 'uploads', 'fileDesc': 'Image Files', 'fileExt': '*.jpg;*.jpeg;*

403 Forbidden error on swfupload and django

爷,独闯天下 提交于 2019-12-07 00:42:25
I'm trying to use a script for multiple file uploads, like swfupload or uploadify on my django application but no matter what I try, I always get a 403 forbidden error for the upload URL. If I try to run the 'same' code (just different links to same files) independently, it works like a charm. Any idea if I'm missing something on my main code or is there some kind of setting that I don't know about? This is totally related with CSRF protection . In my case I solved that issue such that, views.py def photo_upload(request): if request.method == 'POST': for field_name in request.FILES: .... ....

cannot change php upload size limit

别说谁变了你拦得住时间么 提交于 2019-12-06 15:54:09
问题 I used uplaodify plugin to upload music files. Everyting is okay in my local uploadify.php file is in public_html/uploadify directory i want to increment my upload file size limit to 10 MB i tried to put php.ini file in public_html post_max_size = 500M upload_max_filesize = 500M max_execution_time = 900; max_input_time 900 and I am looking my phpinfo() thats good but ı cannot upload bigger than 2MB And i tried to put same php.ini in public_html/uploadify Now I can upload file which size 2.5

Strange CodeIgniter file upload error

我怕爱的太早我们不能终老 提交于 2019-12-06 13:33:50
I've set up 'Uploadify' to upload files to my server where I process them with CodeIgniter's file upload library. However, I think Uploadify changes the mime type of the files, or does something else weird which causes CodeIgniter to give a 'the file type is not allowed' error despite it being allowed. E.g I've allowed JPEG files but when I upload them using Uploadify, I get that error. Is there any workaround for this? Basically, I want only image uploads to be allowed, e.g .jpg, .jpeg, .bmp, .png. Do I have to manually check the extension of the files or is there any better option? You're

How to get uploaded files after form submit using uploadify?

有些话、适合烂在心里 提交于 2019-12-06 10:05:21
Question: I have a form with a textbox, file browse(uploadify) and a submit button. I am submitting this form via AJAX. When I select a file using file browser, it is automatically uploaded to a folder defined against folder option. Now after submitting form, I want to save data into database. I am able to get other fields data after post but unable to get uploaded files. I want an array of uploaded files in $_POST after submitting form like this: $_POST( 'fullname'=>'ABC', 'uploaded_files' => array( '/uploads/abc.doc', '/uploads/xyz.doc' ) ); How it is possible ? I have following

how to pass custom values in uploadify

匆匆过客 提交于 2019-12-05 22:45:17
问题 in uploadify How to pass user input values to uploadify.php here is my code: $(function() { $('#file_upload').uploadify({ 'buttonText' : 'BROWSE...', 'method' : 'post', 'height' : 50, 'buttonCursor' : 'hand', 'fileSizeLimit' : '100KB', 'formData' : { 'title' :$('input:text[name:title]').val(), 'about' :$('input:text[name:about]').val() }, 'auto' : false, 'swf' : 'uploadify.swf', 'checkExisting' : 'check-exists.php', 'uploader' : 'uploadify.php', 'onUploadSuccess' : function(file, data,

Uploadify: Passing a form's ID as a parameter with scriptData

梦想的初衷 提交于 2019-12-05 21:35:53
I need the ability to have multiple upload inputs on one page (potentially hundreds) using Uploadify. The upload PHP file will be renaming the uploaded file based on the ID of the input button used to submit it, so it will need that ID. Since I will be having hundreds of upload buttons on one page, I wanted to create a universal instantiation, so I did this using the class of the forms rather than the ID of the forms. However, when one of the inputs is clicked, I would like to pass the ID of that input as scriptData to the PHP. This is not working; PHP says 'formId' is undefined. Is there a

Uploadify swf requesting URL on page load

左心房为你撑大大i 提交于 2019-12-05 18:22:47
问题 I am using Uploadify on a Asp.net site, the url for the page is /Resource/Create/id, but on page load uploadify appears to be making a request to the root url of that page /Resource/Create/ This is causing a server errors because no id is supplied and filling up my logs, does anyone know what it could be requesting and if it can be set to not request this url. Here is my JS: var id = $('#fileUpload').attr('data-id'); $('#fileUpload').uploadify({ 'swf': '/Scripts/Libraries/uploadify/uploadify