Campo de imagenes en binario
Publicado por Catalina (1 intervención) el 25/09/2018 15:14:28
Holas, necesito una ayuda:
Tengo un proyecto de visual .net y el tiene un campo que son imagenes definido como binario, nos han pedido que lo pasemos a django todo el proyecto, tomamos la base de datos de ese proyecto en visual .net y lo migramos a django y se migra normal el campo de esa foto se pasa como BinaryField pero al mostrarlo no se muestra, hemos tratado de convertir ese campo y no hemos podidos, tratamos de convertir ese binario a base64 y tampoco se puede, que podria hacer?, la base de datos es sqlserver el campo esta definido asi
0xFFD8FFE000104A46494600010101009600960000FFDB0043000302020302020303030304030304050805050404050A070706080C0A0C0C0B0A0B0B0D0E12100D0E110E0B0B1016101113141515150C0F171816141812141514FFDB00430103040405040509050509140D0B0D1414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414FFC0001108023802F403012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00E6CC56CC17F7448F76FF00EB548C2028104651546000F8CFE94EFB336D00A383D86067F9D06D9B7E7CB7E4700FAFE75F0B6AA91F7CBEAEF722782D64421A066C73FEB0D4891446C8CE8AEA236DA4799504B98181950467D59C0FEB576DA1FB669D731C72C4492084F3075F5ABA6A7AF319557049723D4CE7B887CC0CD0B391D3F79FFD6A967D411D57F70463A6D7355DAC6681B32ED5C1C60C82A71A7308B7EF465C7557045656AD6DCD39A8F560B7C838F21B3FECC87FC69B737A61B659D13055B18624D446DD382D201EBD7FC29D711AFD8DA1132E4E3B1C528B927EF3155716972233A4F10DC10A08423B002AB5D6A6F78AA5E35E071F2D2CBA704CFF00A4061E8233FCE83691C76E2479300E06047D7F1CD5A8BDB9899382B368A8B2C99DC11413D404E29F70DE5BC3958C8640DCA0A6E001F7D88CF40A3FC696F5617863D85C32F19E29F3D972A7A8DC799A9728A6F1901658D14E7B2F6A6C97219998C6376382464D5748D18805D941F65FF0A8E7610C8632D21C719CAFF851AC95F98B69732F7465C4DE6593B0545239E1475CD61BDCB3B8C8041C82368E38AD67962485D09721863EF0FF000AC59208CBF0D2633FDE1DFDF15BD396ABDE3295295DBE53EAAF0DE856DA8E85A64EEF72DBEDE37E2E241D541C70C38AB5AC68769A6E972DC4567717B3260AC0B72E1A424818E5B1DEAE786F4F9749F0F695692B87922B58D4B29C83850293C50A65D06F944724A442CDE5C3F7DB03385F73DABE91E91D16A7C94BE37767396D6B61AAF9AE34EB3611724CD7B290DDB2094E474A7DF6896305ACB2A685A4CF346005804C4B3B1C10A098C6339FD2B8BF057C3EB4B2D1EF34FD4AF3549217BA4B88248AD675914021829C2607BF515D7EA1E1AD10477F770A6B7737125EA6A8215495374C89B02AEE5E1481823F9579985A988945FB45669F6DD1D55234A33B425746A45E1DD381453A5E9018B6D1988B1DDE9F7473520D1E17B66FB159E8CF2B46ED0C421C2C9B7A8DDF5C73C8E6A3B7F0F7873EDB6F7C349D57ED2BA936AC32186DB865DADD4E31EDD3D2ABAF86F4ED02DB4A7F0EE897D0DEE9266169E7B82A2395D5A653B9F92768C13D2BD2529F539DF2BD0EBACF4AB311291670C6C402408D7835B1A55AC315C47B634519C1C28F4ACFB3773044D247E539505A3CE769C7233DEB4EC187DA221EAD81F535BA6EDA9CEEC6AC7FEA01CF615148DCF03AD2C6E3ECFC73D39A88B630339143D0489010073516E5DC78C52B3751E9503C94216C41A8C61ED651D8A107F2AF91BE242A278CB5352EA84CC5B0CC0673CFF5AFADB509375B3E7FBA6BE3DF8BDA4CD37C44BF994011B2C4DCB01FF2C973FAE6B8B18AF0D7B9DD826D55D3B146D7E4FBC40E87AF5AEA126DFE5161B7071827B571C83F76A0B0E06319AD98EFC22AEE200C672C6B9B0904AE75E2E4DB5726D4B33C77299233B8027D315CE0B574EA79FAD7A7689A6E81A8D91135E07964046F0FC027D0552D5BE12C1310DA7EB3092DC88673CFE7535A4A52B061ED1DD9C9ADB31B68C970180EE4571FAFEB373A5DC5CD8E9F3CE9A93D9CA631021394077F618ED8FC6BB4D5BC0DAF6860BCB6AD24038F3A160E83B751F4AF3EB3F8A507873C45F2E8EE6EEDCCD049709305F303718FBB9006DFC68C3C5CAA5DA34C5497B24AE7D15F017E24F88BC67A26BD63AC6B5777F6B6FA024F0C171316442B716E0103A74723F1AF30F8D7A2DAEA9E26D1AFD9E467B7021CC58FBAEDB493F4183F957D4F6167A269FF00B35E9BA9697A0D9585D5D6896DBAE2DE04495C9F2C90CC0027900FD4035F2478B35D957575B77529E6439C9618C161C57B4D24AC8F096BA9C0F88FC21697D7B7BE188AF67B8587FE2616C2E1F32C8B824AB7BEC39E3B8C0AC8F0C476165E13B98AF85BDC5CCD72CEB199394042FCC0953F39E99EDC9C1AEA3C37E11D67C69F10A0D71BCEB2B257F256E9230FF3A8C05DA4AE475AEA1BF65AF19F88B4EB8F11E936B68BA35C3BCB6FE7DE4714980C772F964E4104118F6A8B27A1776B5457D2EEFC2B35DD9B5A69E6D9EEA18E0BCB1598BC333960165236068E95E09F1641763CCB0B8788E40F9718E29F2C7B91CB23F56B48F1AE89AE5BA4D63A95BDC46E372B2BF51F8D6D47307230430C6720D7E6CF86FC29E31D5347B6B7B9FB6A4B0B1DAAD39550BD80C57B67C3F87C5FA2D83A35FC96CD1B0D826BA91B23F03D3EB58CAAF233454E4CFAF0B007838A4DAA79E2BC26D7E21F8CB4F88190E9B7C075DD2329FCF6D6BE9DF1C6546116ADA47927F89ED660EA3F3C1A1568BDD83A725D0F5FD8A47A1F6ABD63146B6B35CCEC7CB4E073CE6BCA57E327865C8F33548ED0B7517076E3F1FFEBD2786FE32BEBDAA49A06EB606DC978EE607244EB9E3AFD7F4AD1D48B5A19D9ADCF4B370F270C03AFB8C9AC9D5BC2DA16BB118AFF4AB799718C9419AB56D73E62062383DEA76900F4CFA55A49A0E77D0E067F823E1292F1274B7914272B6FBC, quien me pueda colaborar muchas gracias
Tengo un proyecto de visual .net y el tiene un campo que son imagenes definido como binario, nos han pedido que lo pasemos a django todo el proyecto, tomamos la base de datos de ese proyecto en visual .net y lo migramos a django y se migra normal el campo de esa foto se pasa como BinaryField pero al mostrarlo no se muestra, hemos tratado de convertir ese campo y no hemos podidos, tratamos de convertir ese binario a base64 y tampoco se puede, que podria hacer?, la base de datos es sqlserver el campo esta definido asi
0xFFD8FFE000104A46494600010101009600960000FFDB0043000302020302020303030304030304050805050404050A070706080C0A0C0C0B0A0B0B0D0E12100D0E110E0B0B1016101113141515150C0F171816141812141514FFDB00430103040405040509050509140D0B0D1414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414FFC0001108023802F403012200021101031101FFC4001F0000010501010101010100000000000000000102030405060708090A0BFFC400B5100002010303020403050504040000017D01020300041105122131410613516107227114328191A1082342B1C11552D1F02433627282090A161718191A25262728292A3435363738393A434445464748494A535455565758595A636465666768696A737475767778797A838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE1E2E3E4E5E6E7E8E9EAF1F2F3F4F5F6F7F8F9FAFFC4001F0100030101010101010101010000000000000102030405060708090A0BFFC400B51100020102040403040705040400010277000102031104052131061241510761711322328108144291A1B1C109233352F0156272D10A162434E125F11718191A262728292A35363738393A434445464748494A535455565758595A636465666768696A737475767778797A82838485868788898A92939495969798999AA2A3A4A5A6A7A8A9AAB2B3B4B5B6B7B8B9BAC2C3C4C5C6C7C8C9CAD2D3D4D5D6D7D8D9DAE2E3E4E5E6E7E8E9EAF2F3F4F5F6F7F8F9FAFFDA000C03010002110311003F00E6CC56CC17F7448F76FF00EB548C2028104651546000F8CFE94EFB336D00A383D86067F9D06D9B7E7CB7E4700FAFE75F0B6AA91F7CBEAEF722782D64421A066C73FEB0D4891446C8CE8AEA236DA4799504B98181950467D59C0FEB576DA1FB669D731C72C4492084F3075F5ABA6A7AF319557049723D4CE7B887CC0CD0B391D3F79FFD6A967D411D57F70463A6D7355DAC6681B32ED5C1C60C82A71A7308B7EF465C7557045656AD6DCD39A8F560B7C838F21B3FECC87FC69B737A61B659D13055B18624D446DD382D201EBD7FC29D711AFD8DA1132E4E3B1C528B927EF3155716972233A4F10DC10A08423B002AB5D6A6F78AA5E35E071F2D2CBA704CFF00A4061E8233FCE83691C76E2479300E06047D7F1CD5A8BDB9899382B368A8B2C99DC11413D404E29F70DE5BC3958C8640DCA0A6E001F7D88CF40A3FC696F5617863D85C32F19E29F3D972A7A8DC799A9728A6F1901658D14E7B2F6A6C97219998C6376382464D5748D18805D941F65FF0A8E7610C8632D21C719CAFF851AC95F98B69732F7465C4DE6593B0545239E1475CD61BDCB3B8C8041C82368E38AD67962485D09721863EF0FF000AC59208CBF0D2633FDE1DFDF15BD396ABDE3295295DBE53EAAF0DE856DA8E85A64EEF72DBEDE37E2E241D541C70C38AB5AC68769A6E972DC4567717B3260AC0B72E1A424818E5B1DEAE786F4F9749F0F695692B87922B58D4B29C83850293C50A65D06F944724A442CDE5C3F7DB03385F73DABE91E91D16A7C94BE37767396D6B61AAF9AE34EB3611724CD7B290DDB2094E474A7DF6896305ACB2A685A4CF346005804C4B3B1C10A098C6339FD2B8BF057C3EB4B2D1EF34FD4AF3549217BA4B88248AD675914021829C2607BF515D7EA1E1AD10477F770A6B7737125EA6A8215495374C89B02AEE5E1481823F9579985A988945FB45669F6DD1D55234A33B425746A45E1DD381453A5E9018B6D1988B1DDE9F7473520D1E17B66FB159E8CF2B46ED0C421C2C9B7A8DDF5C73C8E6A3B7F0F7873EDB6F7C349D57ED2BA936AC32186DB865DADD4E31EDD3D2ABAF86F4ED02DB4A7F0EE897D0DEE9266169E7B82A2395D5A653B9F92768C13D2BD2529F539DF2BD0EBACF4AB311291670C6C402408D7835B1A55AC315C47B634519C1C28F4ACFB3773044D247E539505A3CE769C7233DEB4EC187DA221EAD81F535BA6EDA9CEEC6AC7FEA01CF615148DCF03AD2C6E3ECFC73D39A88B630339143D0489010073516E5DC78C52B3751E9503C94216C41A8C61ED651D8A107F2AF91BE242A278CB5352EA84CC5B0CC0673CFF5AFADB509375B3E7FBA6BE3DF8BDA4CD37C44BF994011B2C4DCB01FF2C973FAE6B8B18AF0D7B9DD826D55D3B146D7E4FBC40E87AF5AEA126DFE5161B7071827B571C83F76A0B0E06319AD98EFC22AEE200C672C6B9B0904AE75E2E4DB5726D4B33C77299233B8027D315CE0B574EA79FAD7A7689A6E81A8D91135E07964046F0FC027D0552D5BE12C1310DA7EB3092DC88673CFE7535A4A52B061ED1DD9C9ADB31B68C970180EE4571FAFEB373A5DC5CD8E9F3CE9A93D9CA631021394077F618ED8FC6BB4D5BC0DAF6860BCB6AD24038F3A160E83B751F4AF3EB3F8A507873C45F2E8EE6EEDCCD049709305F303718FBB9006DFC68C3C5CAA5DA34C5497B24AE7D15F017E24F88BC67A26BD63AC6B5777F6B6FA024F0C171316442B716E0103A74723F1AF30F8D7A2DAEA9E26D1AFD9E467B7021CC58FBAEDB493F4183F957D4F6167A269FF00B35E9BA9697A0D9585D5D6896DBAE2DE04495C9F2C90CC0027900FD4035F2478B35D957575B77529E6439C9618C161C57B4D24AC8F096BA9C0F88FC21697D7B7BE188AF67B8587FE2616C2E1F32C8B824AB7BEC39E3B8C0AC8F0C476165E13B98AF85BDC5CCD72CEB199394042FCC0953F39E99EDC9C1AEA3C37E11D67C69F10A0D71BCEB2B257F256E9230FF3A8C05DA4AE475AEA1BF65AF19F88B4EB8F11E936B68BA35C3BCB6FE7DE4714980C772F964E4104118F6A8B27A1776B5457D2EEFC2B35DD9B5A69E6D9EEA18E0BCB1598BC333960165236068E95E09F1641763CCB0B8788E40F9718E29F2C7B91CB23F56B48F1AE89AE5BA4D63A95BDC46E372B2BF51F8D6D47307230430C6720D7E6CF86FC29E31D5347B6B7B9FB6A4B0B1DAAD39550BD80C57B67C3F87C5FA2D83A35FC96CD1B0D826BA91B23F03D3EB58CAAF233454E4CFAF0B007838A4DAA79E2BC26D7E21F8CB4F88190E9B7C075DD2329FCF6D6BE9DF1C6546116ADA47927F89ED660EA3F3C1A1568BDD83A725D0F5FD8A47A1F6ABD63146B6B35CCEC7CB4E073CE6BCA57E327865C8F33548ED0B7517076E3F1FFEBD2786FE32BEBDAA49A06EB606DC978EE607244EB9E3AFD7F4AD1D48B5A19D9ADCF4B370F270C03AFB8C9AC9D5BC2DA16BB118AFF4AB799718C9419AB56D73E62062383DEA76900F4CFA55A49A0E77D0E067F823E1292F1274B7914272B6FBC, quien me pueda colaborar muchas gracias
Valora esta pregunta
0