"><a href="<?php show_image_url(); ?> "><?php show_lang_txt('txt_show_directly_link'); ?> </a>:</label> <input type="text" id="direct-link-<?php show_image_id(); ?> " value="<?php show_image_url(); ?> " /></div> <?php if (is_config_short_url() && is_user_preference_short_url()) { ?> <div class="input-item"><label for="short-url-service-<?php show_image_id(); ?> "><a id="short-url-service-link" href="<?php //show_short_url('service'); ?> "><?php show_tinyurl_service(); ?> </a>:</label> <input type="text" id="short-url-service-<?php show_image_id(); ?> " value="<?php show_image_shorturl_service();
$api_upload->max_size = return_bytes(chevereto_config('max_filesize')); /*** Do the thing? ***/ if ($api_upload->process()) { $api_status_code = 200; $api_status_txt = 'OK'; // Build the data array $api_data_array = $api_upload->image_info; if ($api_upload->is_remote) { $api_data_array['source'] = $to_upload; } else { $api_data_array['source'] = 'base64 image string'; } $api_data_array['resized'] = check_value($to_resize) ? '1' : '0'; $api_txt_output = $api_upload->image_info['image_url']; // Short URL generation if (is_config_short_url()) { require __CHV_PATH_INCLUDES__ . 'shorturl.php'; $api_data_array['shorturl'] = $ShortURL->get_ShortURL($api_upload->image_info['image_url']); } } else { $api_status_code = 403; $api_status_txt = $api_upload->error; } } else { $api_status_code = 403; $api_status_txt = $error; } $REST_API = array('status_code' => $api_status_code, 'status_txt' => $api_status_txt, 'data' => $api_data_array); $OUTPUT_REST_API = array_filter($REST_API); switch ($format) { default:
$upload = new Upload($to_upload); if ($is_remote) { $upload->is_remote = true; } $upload->img_upload_path = __CHV_PATH_IMAGES__; if (isset($to_resize)) { $upload->resize_width = $to_resize; } $upload->thumb_width = chevereto_config('thumb_width'); $upload->thumb_height = chevereto_config('thumb_height'); $upload->max_size = return_bytes(chevereto_config('max_filesize')); $upload->storage = chevereto_config('storage'); /*** Do the thing? ***/ if ($upload->process()) { $imageInfo = $upload->image_info; if (is_config_short_url() && (is_user_preference_short_url() or $_REQUEST['doShort'] == 'true')) { require __CHV_PATH_INCLUDES__ . 'shorturl.php'; switch (chevereto_config('short_url_image')) { default: case 'shorturl': $short_url = 'image_shorturl'; break; case 'direct': $short_url = 'image_url'; break; case 'viewer': $short_url = 'image_viewer'; break; } $short_url = $upload->image_info[$short_url]; $imageInfo['image_shorturl_service'] = $ShortURL->get_ShortURL($short_url);