Announcement

Collapse
No announcement yet.

Carga de imagenes modo archivo/ Image loading in file mode

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Carga de imagenes modo archivo/ Image loading in file mode

    Hola,

    He estado probando la carga de imágenes en modo archivo, he tenido uno que otro inconveniente, como que SC no provee una macro para eliminar las imágenes apropiadamente, tampoco de alguna funcionalidad para renombrar las fotografías a cargar (evitar sobrescribir archivos existentes) esto no se puede lograr de una manera facil hay que modificar el nombre del campo a cargar y ni idea de como modificar el nombre del archivo cargado, otro aspecto es que cuando intento cargar una imagen con algún carácter como paréntesis () no se genera el thumbnail, ¿Estoy haciendo algo mal?

    Alguien ha intentado trabajar con el tema de las imagenes en modo archivo que me pueda guiar o dar algun consejo.

    Saludos.

    Hi,

    I've been testing the image loading in file mode, I'd some inconveniences, like than SC doesn't provide a macro to delete images properly, also any functionality to rename the photos for loading (avoid rewrite the current files) this is not achievable in a easy way, you have to modify the field with the picture name then rename the uploaded image, another aspect is when I try to load an image with special character like parentheses it doesn't generate the thumbnail file, Am I making something wrong?

    I apreciate your advice.

    Thanks.

    PD: excuse my English please

  • #2
    You have to write your own file deletion code. That is just the way it is. And renaming is also something you can customise yourself. Luckily sc isnt doing that by itself, they couldnt foresee everything someone wants to do with a file after uploading..
    Some characters do cause sc to misbehave (I have mentioned this umpteen times and it is only half way fixed). So I suggest renaming the file to a more usefull name if possible.
    You also have to take note of the difference of charactersets tho. Keep your database characterset the same as your os charcterset and as the webpage character set. That is generally the best way..

    Comment


    • #3
      Yes that part was done, I've written all the code for deleting the image, in fact isn't hard, now I'm trying to rename the image loaded in the form before upload it to the server, that is some hard because if I rename the content's field it not changes the uploaded image, on the other hand in trying to control the filesize I know this is possible with server settings but I'll try to do that on the client side.

      Currently I don't know about the solution I'm working on that.

      Comment


      • #4
        Renaming can only be done after the record has been committed. This is because when the record is committed, only then will the files in the tmp directory be copied to destination directory (where you store your files). Once the record is committed you could write your own file rename routine. This should do: rename the file on disk + change the record content with the new filename.

        But be aware! duplicate filenames means the existing file gets overwritten.

        Comment

        Working...
        X