You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 12, 2020. It is now read-only.
Having a little trouble following the javascript code. I wanted to create an additional field in the model called: file_2
Then before uploading the file, have the javascript detect if the file is not an image.
If it is an image it uploads the file to the normal file field.
// file = ImageWithThumbsField(upload_to='filefolder', sizes=((75,75),(120,120)), null=True, blank=True)
If the file being uploaded is not an image, then it would use file_2
// file_2 = models.FileField(upload_to='filefolder', null=True, blank=True)
ImageWithThumbsField is working and I can see how detect for an image...just having trouble seeing how the javascript would change the file field name parameter to file_2
Thanks!
The text was updated successfully, but these errors were encountered:
Having a little trouble following the javascript code. I wanted to create an additional field in the model called: file_2
Then before uploading the file, have the javascript detect if the file is not an image.
If it is an image it uploads the file to the normal file field.
// file = ImageWithThumbsField(upload_to='filefolder', sizes=((75,75),(120,120)), null=True, blank=True)
If the file being uploaded is not an image, then it would use file_2
// file_2 = models.FileField(upload_to='filefolder', null=True, blank=True)
ImageWithThumbsField is working and I can see how detect for an image...just having trouble seeing how the javascript would change the file field name parameter to file_2
Thanks!
The text was updated successfully, but these errors were encountered: